You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Set up the LLM ChatBot example from the [Taipy ChatBot Tutorial](https://docs.taipy.io/en/latest/tutorials/articles/chatbot/) at `http://localhost:5000`. The source code can be found [here](https://github.com/Avaiga/demo-chatbot).
@@ -97,7 +97,7 @@ No validation is performed on the attribute path.
97
97
98
98
### Consequence 3: XSS
99
99
100
-
<imgsrc="https://github.com/user-attachments/assets/0aae38bb-8f08-4850-93c0-ffd60d9006ee"alt="Taipy XSS via class pollution"width="100%">
100
+
<imgsrc="/wiki/img/taipy-xss.gif"alt="Taipy XSS via class pollution"width="100%">
101
101
102
102
In [`taipy/gui/gui.py`](https://github.com/Avaiga/taipy/blob/439c7f52253fc09dd41c455a8a9f8da962d49dfa/taipy/gui/gui.py#L542-L546), when the application attempts to render user content, if the content provider is not found, it falls back to returning `type(content).__name__` as the HTML response:
103
103
@@ -125,7 +125,7 @@ pollute(
125
125
126
126
### Consequence 4: RCE
127
127
128
-
<imgsrc="https://github.com/user-attachments/assets/6419bc85-2492-44f2-857e-a7f60158ae31"alt="Taipy RCE via class pollution"width="100%">
128
+
<imgsrc="/wiki/img/taipy-rce.gif"alt="Taipy RCE via class pollution"width="100%">
129
129
130
130
The class pollution vulnerability allows attackers to set arbitrary attributes on objects that appear in the session state. We found that the `Gui.on_action` route can be leveraged to invoke the `Gui.table_on_edit` method, which allows new objects from the `__main__` module to be bound into the session state. In [`taipy/gui/gui.py`](https://github.com/Avaiga/taipy/blob/439c7f52253fc09dd41c455a8a9f8da962d49dfa/taipy/gui/gui.py#L1872), a `getattr` call on the state object automatically triggers the binding operation, while a subsequent `setattr` immediately resets the bound value to `None`:
1. CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes. <https://cwe.mitre.org/data/definitions/915.html>
189
-
2. Class Pollution leading to RCE in pydash. <https://gist.github.com/CalumHutton/45d33e9ea55bf4953b3b31c84703dfca>
190
-
3. Prototype Pollution in Python. <https://blog.abdulrah33m.com/prototype-pollution-in-python/>
191
-
4. Google Mesop fix (similar vulnerability). <https://github.com/google/mesop/pull/1171>
192
-
5. Liu et al. *The First Large-Scale Systematic Study of Python Class Pollution Vulnerability*. IEEE S&P 2025. <https://jackfromeast.github.io/assets/Pyrl.pdf>
0 commit comments