# CVE-2025-64711: PrivateBin vulnerable to malicious filename use for self-XSS / HTML injection locally for users

> Attackers can execute JavaScript via malicious filenames in drag-and-drop uploads, potentially stealing plaintext or keys from victims.

- **Severity:** Low 3.9 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 13 Nov 2025
- **Updated:** 13 Nov 2025
- **Also known as:** GHSA-r9x7-7ggj-fx9f

## What is CVE-2025-64711?

CVE-2025-64711 is a low-severity cross-site scripting vulnerability in PrivateBin, published on 13 Nov 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

PrivateBin is an online pastebin where the server has zero knowledge of pasted data. Starting in version 1.7.7 and prior to version 2.0.3, dragging a file whose filename contains HTML is reflected verbatim into the page via the drag-and-drop helper, so any user who drops a crafted file on PrivateBin will execute arbitrary JavaScript within their own session (self-XSS). This allows an attacker who can entice a victim to drag or otherwise attach such a file to exfiltrate plaintext, encryption keys, or stored pastes before they are encrypted or sent. Certain conditions must exist for the vulnerability to be exploitable. Only macOS or Linux users are affected, due to the way the `>` character is treated in a file name on Windows. The PrivateBin instance needs to have file upload enabled. An attacker needs to have access to the local file system or somehow convince the user to create (or download) a malicious file (name). An attacker needs to convince the user to attach that malicious file to PrivateBin. Any Mac / Linux user who can be tricked into dragging a maliciously named file into the editor is impacted; code runs in the origin of the PrivateBin instance they are using. Attackers can steal plaintext, passphrases, or manipulate the UI before data is encrypted, defeating the zero-knowledge guarantees for that victim session, assuming counter-measures like Content-Security-Policy (CSP) have been disabled. If CSP is not disabled, HTML injection attacks may be possible - like redirecting to a foreign website, phishing etc. As the whole exploit needs to be included in the file name of the attached file and only affects the local session of the user (aka it is neither persistent nor remotely executable) and that user needs to interact and actively attach that file to the paste, the impact is considered to be practically low. Version 2.0.3 patches the issue.

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation)

## Which versions are affected by CVE-2025-64711?

2 open source packages ship an affected version, including privatebin/privatebin. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `privatebin/privatebin` | Packagist | From 1.7.7 | 2.0.3 |
| `privatebin/privatebin` | Packagist | From 1.7.7 | 2.0.3 |

Products: Privatebin Privatebin.

## How do I fix CVE-2025-64711?

Upgrade privatebin/privatebin to 2.0.3 or later.

## Is CVE-2025-64711 being exploited?

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

## Other vulnerabilities in PrivateBin

- [CVE-2022-24833](https://insights.sbomify.com/CVE-2022-24833/): Persistent Cross-site Scripting (XSS) vulnerability in PrivateBin (high 8.2)
- [CVE-2020-5223](https://insights.sbomify.com/CVE-2020-5223/): Persistent XSS vulnerability in filename of attached file in PrivateBin (medium 6.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-64711 and fix it if it is affected.

What it is: CVE-2025-64711 is a low-severity cross-site scripting vulnerability in PrivateBin, published on 13 Nov 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-64711 exists.

Affected packages and fixed versions:
- privatebin/privatebin (Packagist): affected from 1.7.7; fixed in 2.0.3
- privatebin/privatebin (Packagist): affected from 1.7.7; fixed in 2.0.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-64711/ (Markdown: https://insights.sbomify.com/CVE-2025-64711/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-64711
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-64711
- OSV: https://osv.dev/vulnerability/CVE-2025-64711

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-64711/
Summaries are generated and may contain mistakes; the official description above is the record.
