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

- Severity: Medium 6.8 (CVSS:3.0, scored by @huntr_ai) `CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.32%, higher than 26% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2024-05-16T09:03:44.053Z
- Modified: 2026-06-17T07:45:17.227Z
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: @huntr_ai

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

(As written by CVE List.)

## Affected

- imartinez imartinez/privategpt: from unspecified up to latest
- pribai privategpt: up to 0.6.2

## Every score

- @huntr_ai: CVSS:3.0 6.8 Medium `CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N`
- NVD: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://huntr.com/bounties/cae1a492-4e09-4d56-8e11-17703bdfe653> (exploit, issue-tracking, third-party-advisory)

## Sources

- CVE List: [CVE-2024-3851](https://www.cve.org/CVERecord?id=CVE-2024-3851), CVE Terms of Use, modified 2024-08-01
- NVD: [CVE-2024-3851](https://nvd.nist.gov/vuln/detail/CVE-2024-3851), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-3851 · Whole record: https://cve.day/CVE-2024-3851.json · Rebuilt by cve.day 2026-11-25T22:58:40.431Z
