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.
- 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
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
Which versions are affected by CVE-2025-64711?
2 open source packages ship an affected version, including privatebin/privatebin. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
privatebin/privatebin Packagist | From 1.7.7 | 2.0.3 |
privatebin/privatebin Packagist | From 1.7.7 | 2.0.3 |
Products include Privatebin Privatebin.
How do I fix CVE-2025-64711?
Upgrade privatebin/privatebin to 2.0.3 or later.
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-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
Sources
Also known as GHSA-r9x7-7ggj-fx9f.