CVE-2024-9107 Stored XSS in gaizhenbiao/chuanhuchatgpt
Attackers can inject malicious scripts via chat history uploads due to improper HTML sanitization, leading to arbitrary JavaScript execution in user browsers.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- None listed
What is CVE-2024-9107?
CVE-2024-9107 is a medium-severity cross-site scripting vulnerability in gaizhenbiao/chuanhuchatgpt, published on 20 Mar 2025. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official description
A stored cross-site scripting (XSS) vulnerability exists in the gaizhenbiao/chuanhuchatgpt repository, affecting version git 20b2e02. The vulnerability arises from improper sanitization of HTML tags in chat history uploads. Specifically, the sanitization logic fails to handle HTML tags within code blocks correctly, allowing an attacker to inject malicious scripts. This can lead to the execution of arbitrary JavaScript code in the context of the user's browser, potentially leading to identity theft or other malicious actions.
Weakness: CWE-79
Which versions are affected by CVE-2024-9107?
1 open source package ship an affected version, including chuanhuchatgpt. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
chuanhuchatgpt PyPI | All versions to 2024-09-19 | None |
Products include Gaizhenbiao Chuanhuchatgpt.
How do I fix CVE-2024-9107?
No fix has been published for CVE-2024-9107 yet. Limit exposure of the affected software until one is available.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2024-9107 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-9107 exists.
Other vulnerabilities in gaizhenbiao/chuanhuchatgpt
- CVE-2024-3234 Path Traversal in gaizhenbiao/chuanhuchatgpt
- CVE-2024-5982 Path Traversal in gaizhenbiao/chuanhuchatgpt
- CVE-2024-6255 Path Traversal in gaizhenbiao/chuanhuchatgpt
- CVE-2024-8613 Improper Access Control in gaizhenbiao/chuanhuchatgpt
- CVE-2024-9216 Authentication Bypass in gaizhenbiao/ChuanhuChatGPT
Sources
Also known as GHSA-hm5x-x82r-982c, PYSEC-2025-95.