# CVE-2024-6038: ReDoS Vulnerability in gaizhenbiao/chuanhuchatgpt

- Severity: High 7.5 (CVSS:3.0, scored by @huntr_ai) `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.66%, higher than 52% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2024-06-27T18:41:45.405Z
- Modified: 2026-07-13T07:15:21.472Z
- Also known as: PYSEC-2024-318
- Weaknesses: CWE-1333
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: @huntr_ai

## Description

A Regular Expression Denial of Service (ReDoS) vulnerability exists in the latest version of gaizhenbiao/chuanhuchatgpt. The vulnerability is located in the filter_history function within the utils.py module. This function takes a user-provided keyword and attempts to match it against chat history filenames using a regular expression search. Due to the lack of sanitization or validation of the keyword parameter, an attacker can inject a specially crafted regular expression, leading to a denial of service condition. This can cause severe degradation of service performance and potential system unavailability.

(As written by CVE List.)

## Affected

- gaizhenbiao gaizhenbiao/chuanhuchatgpt: from unspecified before 20240918
- gaizhenbiao chuanhuchatgpt: 0; 20240410
- chuanhuchatgpt (PyPI): up to 20240410

## Every score

- @huntr_ai: CVSS:3.0 7.5 High `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- PyPA Advisory Database: CVSS:3.0 7.5 High `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://huntr.com/bounties/d41cca0a-82bc-4cbf-a52a-928d304fb42d> (exploit, evidence, third-party-advisory)
- <https://github.com/gaizhenbiao/chuanhuchatgpt/commit/fcdd5fd6b05ef537a1db185ab115758d87e1ba3f> (fix)

## Sources

- CVE List: [CVE-2024-6038](https://www.cve.org/CVERecord?id=CVE-2024-6038), CVE Terms of Use, modified 2025-10-15
- NVD: [CVE-2024-6038](https://nvd.nist.gov/vuln/detail/CVE-2024-6038), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2024-318](https://osv.dev/vulnerability/PYSEC-2024-318), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2024-6038 · Whole record: https://cve.day/CVE-2024-6038.json · Rebuilt by cve.day 2026-11-25T22:58:42.296Z
