CVE-2024-3851 Unrestricted File Upload Leading to XSS in imartinez/privategpt

Medium 6.8 Published Updated

Attackers can upload malicious HTML files to execute arbitrary JavaScript in victim sessions, enabling phishing or session hijacking in PrivateGPT.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2024-3851?

CVE-2024-3851 is a medium-severity cross-site scripting vulnerability in imartinez/privategpt, published on 16 May 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

A stored Cross-Site Scripting (XSS) vulnerability exists in the 'imartinez/privategpt' repository due to improper validation of file uploads. Attackers can exploit this vulnerability by uploading malicious HTML files, such as those containing JavaScript payloads, which are then executed in the context of the victim's session when accessed. This could lead to the execution of arbitrary JavaScript code in the context of the user's browser session, potentially resulting in phishing attacks or other malicious actions. The vulnerability affects the latest version of the repository.

Weakness: CWE-79

Which versions are affected by CVE-2024-3851?

It affects 1 product.

Products include Pribai Privategpt.

How do I fix CVE-2024-3851?

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

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2024-3851 being exploited?

There is no known exploitation of CVE-2024-3851 in the wild and no public exploit code.

Sources

Also known as GHSA-rw5r-chjg-pmjp.

Is CVE-2024-3851 in your software?

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

Check your SBOMs for free