Skip to content

Commit f4b6c62

Browse files
committed
feat: migrate landing page to Hugo-based source
Transition the landing page management to a Hugo-based system to simplify future maintenance and content updates. This change introduces structured source files including markdown content and layouts, while refreshing the landing page with expanded information on research impact, detection methodology, and recent vulnerability findings.
1 parent cf72d74 commit f4b6c62

5 files changed

Lines changed: 419 additions & 129 deletions

File tree

website/index.html

Lines changed: 108 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4+
<meta name="generator" content="Hugo 0.161.1">
45
<meta charset="UTF-8">
56
<meta name="viewport" content="width=device-width, initial-scale=1.0">
67
<title>Python Class Pollution</title>
@@ -12,45 +13,27 @@
1213
<body>
1314

1415
<div class="container">
15-
<h1>(All You Ever Wanted To Know About) <br> Python Class Pollution</h1>
16-
17-
<div class="links-bar">
18-
<a href="wiki/docs/">Wiki</a>
19-
<a href="https://jackfromeast.github.io/assets/Pyrl.pdf">Paper</a>
20-
<a href="wiki/docs/tool/pyrl/">Tool</a>
21-
<a href="wiki/docs/reference/cve-index/">Dataset</a>
22-
</div>
23-
24-
<h2>What is Python class pollution?</h2>
25-
<img class="hero-icon" src="img/icon.png" alt="Python Class Pollution">
26-
<p class="justified">
27-
A class pollution vulnerability occurs when attacker-controlled input modifies unintended objects through Python's class-based inheritance model. It arises two core Python language design: (i) <strong>uniform data model</strong>, where every value is an object with attributes like <code>__class__</code> and <code>__globals__</code>, and (ii) its <strong>flexible reflection mechanism</strong>, such as dynamic <code>getattr</code> and <code>setattr</code>.
28-
</p>
29-
<p class="justified">
30-
The attacker leverages a sequence of reflective attribute lookups with attacker-controlled names to traverse objects and modify attributes in unintended classes or modules. The exploitation of class pollution can lead to various severe consequences including remote code execution (RCE), authentication bypass, cross-site scripting (XSS), denial-of-service (DoS), etc.
31-
</p>
32-
33-
<p>
34-
This research was presented at <a href="https://www.ieee-security.org/TC/SP2025/">IEEE S&amp;P 2026</a> by Zhengyu Liu, Jiacheng Zhong, Jianjia Yu, Muxi Lyu, Zifeng Kang, and Yinzhi Cao.
35-
</p>
36-
37-
<h2>History</h2>
38-
<p>
39-
Class pollution was <a href="https://blog.abdulrah33m.com/prototype-pollution-in-python/">first introduced</a> in 2023 by Abdulraheem Khaled <sup><a href="https://blog.abdulrah33m.com/prototype-pollution-in-python/">[1]</a></sup>, who disclosed a real-world vulnerability in the <a href="https://github.com/dgilland/pydash">pydash</a> library. It was originally called "Prototype Pollution in Python" due to its similarity to <a href="https://portswigger.net/web-security/prototype-pollution">JavaScript prototype pollution</a>.
40-
</p>
41-
<p>
42-
Since then, only one additional CVE (<a href="https://nvd.nist.gov/vuln/detail/CVE-2024-5452">CVE-2024-5452</a>) was discovered before our study. In 2023, Ouyang <sup><a href="https://ieeexplore.ieee.org/abstract/document/10145365">[2]</a></sup> demonstrated the feasibility of class pollution attacks through a small, synthetic example. In 2024, Zhang <sup><a href="https://doi.org/10.54254/2755-2721/43/20230839">[3]</a></sup> explored an exploitation technique targeting global variables pollution and discussed two possible defenses.
43-
</p>
44-
<p>
45-
Our work (2026) <sup><a href="https://jackfromeast.github.io/assets/Pyrl.pdf">[4]</a></sup> introduces a systematic taxonomy of class pollution (five of six variants are novel), an automated detection tool (Pyrl), and a large-scale measurement of class pollution vulnerabilities across the Python ecosystem&mdash;uncovering 47 zero-day vulnerabilities in widely used applications and packages.
46-
</p>
47-
48-
<h2>How does it work?</h2>
49-
<p>
50-
Consider a common recursive update function intended to set nested fields of an object based on user input:
51-
</p>
52-
53-
<pre><code class="language-python">def update(obj, data):
16+
<h1>(All You Ever Wanted To Know About) <br> Python Class Pollution</h1>
17+
<div class="links-bar">
18+
<a href="wiki/docs/">Wiki</a>
19+
<a href="https://jackfromeast.github.io/assets/Pyrl.pdf">Paper</a>
20+
<a href="wiki/docs/tool/pyrl/">Tool</a>
21+
<a href="wiki/docs/reference/cve-index/">Dataset</a>
22+
</div>
23+
<h2>What is Python class pollution?</h2>
24+
<img class="hero-icon" src="img/icon.png" alt="Python Class Pollution">
25+
<p class="justified">
26+
Python class pollution is a vulnerability class where untrusted input allows attackers to modify unintended Python runtime objects.
27+
It arises from two core Python language features: (i) a <strong>uniform object model</strong>, where every value is an object and objects expose references to their classes, metadata, and related runtime state through built-in attributes such as <code>__class__</code>, <code>__base__</code>, <code>__dict__</code>, and <code>__globals__</code>;
28+
and (ii) <strong>flexible reflection mechanisms</strong>, such as dynamic <code>getattr</code> and <code>setattr</code>, which allow programs to access and modify attributes using runtime-determined names.
29+
</p>
30+
<p class="justified">
31+
The combination of these two language features becomes dangerous when a program performs a sequence of reflective attribute or item lookups using attacker-controlled names. These lookups may cause the program to traverse from an ordinary object to unintended runtime objects through those built-in attributes, and then modify their content that later affect program behavior.
32+
These modifications violate runtime integrity and can lead to severe consequences, including remote code execution (RCE), authentication bypass, cross-site scripting (XSS), denial of service (DoS), and token leakage.
33+
</p>
34+
<h2>How does it work?</h2>
35+
<p>Consider a common recursive update function intended to set nested fields of an object based on user input:</p>
36+
<pre><code class="language-python">def update(obj, data):
5437
for key in data:
5538
val = data[key]
5639
if isinstance(val, dict):
@@ -59,102 +42,98 @@ <h2>How does it work?</h2>
5942
setattr(obj, key, val)
6043

6144
# Attacker payload:
62-
update(user, {"__class__": {"__getattribute__": "1337"}})</code></pre>
63-
64-
<p>
65-
If <code>data</code> is attacker-controlled, it can be crafted to access unintended objects by traversing Python's built-in attributes. In the example above, the attacker uses the key <code>__class__</code> to retrieve the class object of <code>user</code> via <code>getattr</code>, then sets its <code>__getattribute__</code> method to a non-callable string. Since Python implicitly invokes <code>__getattribute__</code> for all attribute accesses, this triggers a runtime exception on any access to <code>User</code> instances, resulting in a denial-of-service (DoS).
66-
</p>
67-
68-
<p>
69-
To further exploit class pollution toward severe consequences, e.g., RCE, XSS, auth bypass, we need to consider (i) <a href="wiki/docs/taxonomy/">pollution primitives</a> (how can attacker-controlled input resolve and modify objects), (ii) <a href="wiki/docs/targets/">pollution targets</a> (what are the valuable targets to pollute and how will they affect the Python runtime), and (iii) <a href="wiki/docs/gadgets/">gadgets</a> (how can polluted values lead to concrete impacts). See the <a href="wiki/docs/">full wiki</a> for details.
70-
</p>
71-
72-
<h2>Attack demonstrations</h2>
73-
<p>
74-
Here, we show a zero-day class pollution vulnerablity found in <a href="https://github.com/django-commons/django-unicorn/security/advisories/GHSA-g9wf-5777-gq43">django-unicorn (CVE-2025-24370)</a> can be exploited to lead to the following four types of consequences:
75-
</p>
76-
77-
<div class="demos">
78-
<figure>
79-
<img src="img/xss.gif" alt="Stored XSS via BeautifulSoup entity map overwrite">
80-
<figcaption>Stored XSS via BeautifulSoup entity map overwrite</figcaption>
81-
</figure>
82-
<figure>
83-
<img src="img/auth-bypass.gif" alt="Authentication bypass via Django SECRET_KEY pollution">
84-
<figcaption>Authentication bypass via Django SECRET_KEY pollution</figcaption>
85-
</figure>
86-
<figure>
87-
<img src="img/dos.gif" alt="Denial of Service via decorator corruption">
88-
<figcaption>Denial of Service via decorator corruption</figcaption>
89-
</figure>
90-
<figure>
91-
<img src="img/rce.gif" alt="Remote Code Execution via os.environ.BROWSER pollution">
92-
<figcaption>Remote Code Execution via os.environ.BROWSER pollution</figcaption>
93-
</figure>
94-
</div>
95-
96-
<h2>CVEs at a glance</h2>
97-
<p>
98-
We applied our detection tool <strong>Pyrl</strong> to over <strong>671K</strong> Python packages from GitHub and PyPI. It reported <strong>868</strong> alerts, of which <strong>47</strong> were confirmed as exploitable zero-day vulnerabilities:
99-
</p>
100-
101-
<table>
102-
<thead>
103-
<tr>
104-
<th>Application</th>
105-
<th>CVE</th>
106-
<th>Impact</th>
107-
</tr>
108-
</thead>
109-
<tbody>
110-
<tr>
111-
<td>Azure CLI</td>
112-
<td><a href="https://msrc.microsoft.com/update-guide/vulnerability/CVE-2025-24049">CVE-2025-24049</a></td>
113-
<td>RCE, Token Leakage</td>
114-
</tr>
115-
<tr>
116-
<td>Django Unicorn</td>
117-
<td><a href="https://github.com/django-commons/django-unicorn/security/advisories/GHSA-g9wf-5777-gq43">CVE-2025-24370</a></td>
118-
<td>RCE, XSS, Auth Bypass, DoS</td>
119-
</tr>
120-
<tr>
121-
<td>Taipy</td>
122-
<td><a href="https://nvd.nist.gov/vuln/detail/CVE-2025-30374">CVE-2025-30374</a></td>
123-
<td>RCE, XSS, DoS</td>
124-
</tr>
125-
<tr>
126-
<td>Mesop</td>
127-
<td><a href="https://nvd.nist.gov/vuln/detail/CVE-2025-30358">CVE-2025-30358</a></td>
128-
<td>DoS</td>
129-
</tr>
130-
<tr>
131-
<td>ComfyUI</td>
132-
<td><a href="https://nvd.nist.gov/vuln/detail/CVE-2025-6107">CVE-2025-6107</a></td>
133-
<td>DoS</td>
134-
</tr>
135-
<tr>
136-
<td>RAGFlow</td>
137-
<td>Pending</td>
138-
<td>DoS</td>
139-
</tr>
140-
<tr>
141-
<td>Hugging Face Diffusers</td>
142-
<td>Pending</td>
143-
<td>DoS</td>
144-
</tr>
145-
</tbody>
146-
</table>
147-
148-
<h2>Citation</h2>
149-
<pre><code class="nohighlight">@inproceedings{liu2026classpollution,
45+
update(user, {&quot;__class__&quot;: {&quot;__getattribute__&quot;: &quot;1337&quot;}})
46+
</code></pre>
47+
<p>If <code>data</code> is attacker-controlled, it can be crafted to access unintended objects by traversing Python&rsquo;s built-in attributes. In the example above, the attacker uses the key <code>__class__</code> to retrieve the class object of <code>user</code> via <code>getattr</code>, then sets its <code>__getattribute__</code> method to a non-callable string. Since Python implicitly invokes <code>__getattribute__</code> for all attribute accesses, this triggers a runtime exception on any access to <code>User</code> instances, resulting in a denial-of-service (DoS).</p>
48+
<p>To further exploit class pollution toward severe consequences, e.g., RCE, XSS, authentication bypass, we need to consider (i) <a href="wiki/docs/taxonomy/">pollution primitives</a> (how can attacker-controlled input resolve and modify objects), (ii) <a href="wiki/docs/targets/">pollution targets</a> (what are the valuable targets to pollute and how will they affect the Python runtime), and (iii) <a href="wiki/docs/gadgets/">gadgets</a> (how can polluted values lead to concrete impacts). See the <a href="wiki/docs/">full wiki</a> for details.</p>
49+
<h2>Why does it matter?</h2>
50+
<p>Class pollution matters because it violates Python runtime integrity. Once unintended runtime objects are polluted, the modified values may flow into security-sensitive sinks and lead to serious consequences. As an example, we show how a zero-day class pollution vulnerability in <a href="https://github.com/django-commons/django-unicorn/security/advisories/GHSA-g9wf-5777-gq43">django-unicorn (CVE-2025-24370)</a> can be exploited to cause four types of impact:</p>
51+
<div class="demos">
52+
<figure>
53+
<img src="img/xss.gif" alt="Stored XSS via BeautifulSoup entity map overwrite">
54+
<figcaption>Stored XSS via BeautifulSoup entity map overwrite</figcaption>
55+
</figure>
56+
<figure>
57+
<img src="img/auth-bypass.gif" alt="Authentication bypass via Django SECRET_KEY pollution">
58+
<figcaption>Authentication bypass via Django SECRET_KEY pollution</figcaption>
59+
</figure>
60+
<figure>
61+
<img src="img/dos.gif" alt="Denial of Service via decorator corruption">
62+
<figcaption>Denial of Service via decorator corruption</figcaption>
63+
</figure>
64+
<figure>
65+
<img src="img/rce.gif" alt="Remote Code Execution via os.environ.BROWSER pollution">
66+
<figcaption>Remote Code Execution via os.environ.BROWSER pollution</figcaption>
67+
</figure>
68+
</div>
69+
<p>For payloads and technical details, see the <a href="/wiki/docs/collection/showcases/django-unicorn/">full django-unicorn showcase</a>.</p>
70+
<h2>How to detect it?</h2>
71+
<p>To detect class pollution at scale, we built <strong>Pyrl</strong> (/pɜːrl/, &ldquo;Pearl&rdquo;), the <em>first</em> automated detection tool for Python class pollution. Pyrl introduces a novel static analysis called <em>operational taint analysis</em>, implemented on top of CodeQL, that precisely models the reflective attribute and item lookups used to traverse and modify objects, and tracks attacker-controlled inputs through them with a set of fine-grained, expressive semantic taint labels.</p>
72+
<p>Pyrl detects all six variants in our <a href="wiki/docs/taxonomy/">taxonomy</a>, performs exploitability checking, and uses barrier-node analysis to suppress false positives from key sanitization and type checks. Across over <strong>671K</strong> Python packages, it has identified <strong>47</strong> confirmed zero-day class pollution vulnerabilities.</p>
73+
<p>To run it on your own code, see the <a href="wiki/docs/tool/pyrl/">Pyrl documentation</a> for installation and usage.</p>
74+
<h2>CVEs at a glance</h2>
75+
<p>A selective list of the confirmed class pollution vulnerabilities:</p>
76+
<table>
77+
<thead>
78+
<tr>
79+
<th>Application</th>
80+
<th>CVE</th>
81+
<th>Impact</th>
82+
</tr>
83+
</thead>
84+
<tbody>
85+
<tr>
86+
<td>Azure CLI</td>
87+
<td><a href="https://msrc.microsoft.com/update-guide/vulnerability/CVE-2025-24049">CVE-2025-24049</a></td>
88+
<td>RCE, Token Leakage</td>
89+
</tr>
90+
<tr>
91+
<td>Django Unicorn</td>
92+
<td><a href="https://github.com/django-commons/django-unicorn/security/advisories/GHSA-g9wf-5777-gq43">CVE-2025-24370</a></td>
93+
<td>RCE, XSS, Auth Bypass, DoS</td>
94+
</tr>
95+
<tr>
96+
<td>Taipy</td>
97+
<td><a href="https://nvd.nist.gov/vuln/detail/CVE-2025-30374">CVE-2025-30374</a></td>
98+
<td>RCE, XSS, DoS</td>
99+
</tr>
100+
<tr>
101+
<td>Mesop</td>
102+
<td><a href="https://nvd.nist.gov/vuln/detail/CVE-2025-30358">CVE-2025-30358</a></td>
103+
<td>DoS</td>
104+
</tr>
105+
<tr>
106+
<td>ComfyUI</td>
107+
<td><a href="https://nvd.nist.gov/vuln/detail/CVE-2025-6107">CVE-2025-6107</a></td>
108+
<td>DoS</td>
109+
</tr>
110+
<tr>
111+
<td>RAGFlow</td>
112+
<td>Pending</td>
113+
<td>DoS</td>
114+
</tr>
115+
<tr>
116+
<td>Hugging Face Diffusers</td>
117+
<td>Pending</td>
118+
<td>DoS</td>
119+
</tr>
120+
</tbody>
121+
</table>
122+
<h2>History</h2>
123+
<p>Class pollution was <a href="https://blog.abdulrah33m.com/prototype-pollution-in-python/">first introduced</a> in 2023 by Abdulraheem Khaled <sup><a href="https://blog.abdulrah33m.com/prototype-pollution-in-python/">[1]</a></sup>, who disclosed a real-world vulnerability in the <a href="https://github.com/dgilland/pydash">pydash</a> library. It was originally called &ldquo;Prototype Pollution in Python&rdquo; due to its similarity to <a href="https://portswigger.net/web-security/prototype-pollution">JavaScript prototype pollution</a>.</p>
124+
<p>Since then, only one additional CVE (<a href="https://nvd.nist.gov/vuln/detail/CVE-2024-5452">CVE-2024-5452</a>) was discovered before our study. In 2023, Ouyang <sup><a href="https://ieeexplore.ieee.org/abstract/document/10145365">[2]</a></sup> demonstrated the feasibility of class pollution attacks through a small, synthetic example. In 2024, Zhang <sup><a href="https://doi.org/10.54254/2755-2721/43/20230839">[3]</a></sup> explored an exploitation technique targeting global variables pollution and discussed two possible defenses.</p>
125+
<p>Our work (2026) <sup><a href="https://jackfromeast.github.io/assets/Pyrl.pdf">[4]</a></sup> introduces a systematic taxonomy of class pollution (five of six variants are novel), an automated detection tool (Pyrl), and a large-scale measurement of class pollution vulnerabilities across the Python ecosystem, uncovering 47 zero-day vulnerabilities in widely used applications and packages.</p>
126+
<h2>Citation</h2>
127+
<p><a href="https://jackfromeast.github.io/assets/Pyrl.pdf">This research</a> was presented at IEEE S&amp;P 2026 by Zhengyu Liu, Jiacheng Zhong, Jianjia Yu, Muxi Lyu, Zifeng Kang, and Yinzhi Cao. Please feel free to cite our paper!</p>
128+
<pre><code class="nohighlight">@inproceedings{liu2026classpollution,
150129
title={The First Large-Scale Systematic Study of Python Class Pollution Vulnerability},
151130
author={Liu, Zhengyu and Zhong, Jiacheng and Yu, Jianjia and Lyu, Muxi and Kang, Zifeng and Cao, Yinzhi},
152131
booktitle={2026 IEEE Symposium on Security and Privacy (SP)},
153132
year={2026}
154133
}</code></pre>
134+
<br>
135+
<small>Last updated: May 12, 2026.</small>
155136

156-
<br>
157-
<small>Last updated: May 12, 2026.</small>
158137
</div>
159138

160139
<style>

website/source-landing/.hugo_build.lock

Whitespace-only changes.

0 commit comments

Comments
 (0)