CVE-2025-64711
PrivateBin vulnerable to malicious filename use for self-XSS / HTML injection locally for users
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.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- Required
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
3.9
PrivateBin vulnerable to malicious filename use for self-XSS / HTML injection locally for users
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.
- Record
CVE-2025-64711- CVSS 3.1
- 3.9 Low
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
EUVDEUVD-2025-150355
3.9
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.
- Record
EUVD-2025-150355- CVSS 3.1
- 3.9 Low
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-r9x7-7ggj-fx9f
3.9
PrivateBin vulnerable to malicious filename use for self-XSS / HTML injection locally for users
Summary
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.
Note 1: as the malicious filename must contain the > character, the victim must not be using Windows for this to work, since this OS simply forbids this character in filenames.
Note 2: most PrivateBin instances use the Content-Security-Policy header to prevent most use-cases of this vulnerability. This report will describe the impact as if this header had been disabled by the PrivateBin instance owner.
Affected versions
PrivateBin versions since 1.7.7 and before 2.0.3.
Conditions
- Only macIOS 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.
Impact
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, similar HTML injection attacks as described in CVE-2025-62796 may be possible - like redirecting to a foreign website, phishing etc.
Real-life impact
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.
Technical Description
When a file is dropped, readFileData collects all filenames and calls printDragAndDropFileNames:
const fileNames = loadedFiles.map((loadedFile => loadedFile.name));
printDragAndDropFileNames(fileNames);
printDragAndDropFileNames then renders those names:
function printDragAndDropFileNames(fileNames) {
$dragAndDropFileNames.html(fileNames.join('<br>'));
}
This will insecurely render the user-submitted filenames as HTML.
This vulnerability has been introduced in this commit (introduced in 1.7.7).
The previous render method was using .text():
$dragAndDropFileName.text(loadedFile.name);
Reproduction Steps
- On a Unix-like system, create a file with an HTML/JS payload in its name, e.g. by running
touch '"><img src=x onerror=alert(document.domain)>.txt'. - Deploy or use any PrivateBin instance with attachments enabled (including https://privatebin.net/).
- Open the UI in a browser and start a new paste.
- Drag the crafted file anywhere on the page
- As soon as it is dropped, the filename is inserted into
#dragAndDropFileNameas HTML and the onerror handler fires (assuming CSP is disabled), showing the alert.
Mitigation
PrivateBin strongly recommends users to upgrade to the latest release. However, here are some workarounds that may help users to mitigate this vulnerability without upgrade:
- Update the CSP in your configuration file to the latest recommended settings and check that it isn't getting reverted or overwritten by the web server,…
- Record
GHSA-r9x7-7ggj-fx9f- CVSS 3.1
- 3.9 Low
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
NVD
3.9
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.
- Record
CVE-2025-64711- CVSS 3.1
- 3.9 Low
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N - 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 - Weakness
- CWE-79
- Updated
- 2026-11-02
OSV
3.9
PrivateBin vulnerable to malicious filename use for self-XSS / HTML injection locally for users
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.
- Record
CVE-2025-64711- CVSS 3.1
- 3.9 Low
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSVGHSA-r9x7-7ggj-fx9f
3.9
PrivateBin vulnerable to malicious filename use for self-XSS / HTML injection locally for users
Summary
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.
Note 1: as the malicious filename must contain the > character, the victim must not be using Windows for this to work, since this OS simply forbids this character in filenames.
Note 2: most PrivateBin instances use the Content-Security-Policy header to prevent most use-cases of this vulnerability. This report will describe the impact as if this header had been disabled by the PrivateBin instance owner.
Affected versions
PrivateBin versions since 1.7.7 and before 2.0.3.
Conditions
- Only macIOS 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.
Impact
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, similar HTML injection attacks as described in CVE-2025-62796 may be possible - like redirecting to a foreign website, phishing etc.
Real-life impact
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.
Technical Description
When a file is dropped, readFileData collects all filenames and calls printDragAndDropFileNames:
const fileNames = loadedFiles.map((loadedFile => loadedFile.name));
printDragAndDropFileNames(fileNames);
printDragAndDropFileNames then renders those names:
function printDragAndDropFileNames(fileNames) {
$dragAndDropFileNames.html(fileNames.join('<br>'));
}
This will insecurely render the user-submitted filenames as HTML.
This vulnerability has been introduced in this commit (introduced in 1.7.7).
The previous render method was using .text():
$dragAndDropFileName.text(loadedFile.name);
Reproduction Steps
- On a Unix-like system, create a file with an HTML/JS payload in its name, e.g. by running
touch '"><img src=x onerror=alert(document.domain)>.txt'. - Deploy or use any PrivateBin instance with attachments enabled (including https://privatebin.net/).
- Open the UI in a browser and start a new paste.
- Drag the crafted file anywhere on the page
- As soon as it is dropped, the filename is inserted into
#dragAndDropFileNameas HTML and the onerror handler fires (assuming CSP is disabled), showing the alert.
Mitigation
PrivateBin strongly recommends users to upgrade to the latest release. However, here are some workarounds that may help users to mitigate this vulnerability without upgrade:
- Update the CSP in your configuration file to the latest recommended settings and check that it isn't getting reverted or overwritten by the web server,…
- Record
GHSA-r9x7-7ggj-fx9f- CVSS 3.1
- 3.9 Low
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
privatebin/privatebinPackagist |
1.7.7 up to 2.0.3 | 2.0.3 |
privatebin/privatebinPackagist |
1.7.7 up to 2.0.3, plus listed versions 1.7.81.7.92.0.02.0.12.0.2 |
2.0.3 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2025-64711 is a low vulnerability (CVSS 3.9) in Privatebin, published November 13, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.13%, the 2nd percentile. Fixed in privatebin/privatebin 2.0.3.
References
github.com/PrivateBin/PrivateBin/security/advisories/GHSA-r9x7-7ggj-fx9f
github.com/PrivateBin/PrivateBin/commit/f9550e513381208b36595ee2404e968144bba78b
nvd.nist.gov/vuln/detail/CVE-2025-64711
github.com/advisories/GHSA-r9x7-7ggj-fx9f
github.com/CVEProject/cvelistV5/tree/main/cves/2025/64xxx/CVE-2025-64711.json
github.com/PrivateBin/PrivateBin
Left out here: the rest of 2 source descriptions. The JSON record has them.