CVE-2024-2217 in chuanhuchatgptinfo

Summary

by MITRE • 04/10/2024

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.

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Analysis

by VulDB Data Team • 07/29/2025

This vulnerability represents a critical improper access control flaw that fundamentally undermines the security posture of the chuanhuchatgpt application. The vulnerability exists within the application's HTTP request handling mechanism for the config.json file, where the system fails to implement proper authentication checks before serving sensitive configuration data. This weakness allows attackers to bypass normal access controls regardless of whether they are authenticated users or unauthenticated visitors, creating a persistent security risk that affects all deployment scenarios of the application. The vulnerability directly maps to CWE-285, which specifically addresses improper access control issues in software systems.

The technical implementation of this flaw manifests in the application's failure to validate user credentials or session tokens when processing requests for the config.json endpoint. Attackers can simply craft HTTP requests to access the configuration file without providing any authentication credentials, thereby gaining access to critical sensitive information. This includes API keys for major services such as OpenAI, Google PaLM, and XMChat, along with other configuration details that may contain user credentials or system parameters. The vulnerability's impact extends beyond simple information disclosure as it potentially enables further attacks including privilege escalation, data exfiltration, and unauthorized service usage.

The operational impact of this vulnerability is severe and multifaceted, as it creates a persistent backdoor for attackers to access sensitive configuration data. Once exploited, attackers can obtain API keys that may have broad access to cloud services and AI platforms, potentially leading to unauthorized usage and associated costs. The exposure of configuration details could reveal internal system architecture, user credentials, and other sensitive parameters that attackers could leverage for further exploitation. This vulnerability particularly affects organizations using the application in production environments where the configuration files may contain production-level credentials and service endpoints that could be used for lateral movement within networks or for external attacks.

Mitigation strategies for this vulnerability should focus on implementing robust authentication and authorization controls for all configuration endpoints. The application must enforce proper access control checks before serving any configuration data, requiring valid authentication tokens or session credentials for access to sensitive files. Security measures should include implementing role-based access control, adding request validation layers, and ensuring that configuration endpoints are protected by the same security mechanisms used for other sensitive application resources. Organizations should also consider implementing network-level protections, such as firewall rules that restrict access to configuration endpoints, and regular security audits to identify similar access control issues. This vulnerability aligns with ATT&CK technique T1566 which covers credential harvesting through various means, and T1078 which addresses legitimate credentials usage for persistence and privilege escalation.

Responsible

Huntr.dev

Reservation

03/06/2024

Disclosure

04/10/2024

Moderation

accepted

CPE

ready

EPSS

0.00779

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!