CVE-2024-4321 Local File Inclusion (LFI) in gaizhenbiao/chuanhuchatgpt

High 7.5 Published Updated

Attackers can read sensitive server files by manipulating file paths in chat history uploads, exposing API keys and private data.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2024-4321?

CVE-2024-4321 is a high-severity path traversal vulnerability in gaizhenbiao/chuanhuchatgpt, published on 16 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

A Local File Inclusion (LFI) vulnerability exists in the gaizhenbiao/chuanhuchatgpt application, specifically within the functionality for uploading chat history. The vulnerability arises due to improper input validation when handling file paths during the chat history upload process. An attacker can exploit this vulnerability by intercepting requests and manipulating the 'name' parameter to specify arbitrary file paths. This allows the attacker to read sensitive files on the server, leading to information leakage, including API keys and private information. The issue affects version 20240310 of the application.

Weakness: CWE-20

Which versions are affected by CVE-2024-4321?

1 open source package ship an affected version, including chuanhuchatgpt. It affects 1 product.

PackageAffectedFixed in
chuanhuchatgpt PyPIAll versions to 20240310None

Products include Gaizhenbiao Chuanhuchatgpt.

How do I fix CVE-2024-4321?

No fix has been published for CVE-2024-4321 yet. Limit exposure of the affected software until one is available.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2024-4321 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-4321 exists.

Sources

Also known as GHSA-55c5-qvfc-69mh, PYSEC-2024-267.

Is CVE-2024-4321 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free