CVE-2025-64711: Privatebin/privatebin Cross-Site Scripting Vulnerability
LOWCVE-2025-64711 is a LOW (CVSS 3.9) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Privatebin/privatebin libraries in the Packagist ecosystem. The issue involves privatebin vulnerable to malicious filename use for self-xss / html injection locally for users. Remediation is available by upgrading affected packages to version 2.0.3.
CVE-2025-64711 at a Glance
Security Impact
CVSS: 3.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N).
How to Fix CVE-2025-64711
To remediate this vulnerability, upgrade all affected Privatebin/privatebin dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade privatebin/privatebin to 2.0.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for privatebin/privatebin
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-64711, inspect your project dependencies for Privatebin/privatebin:
inspect dependencies for privatebin/privatebin
Analyze the terminal output to locate any version of Privatebin/privatebin in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.3), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Privatebin/privatebin, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-64711 Affected Privatebin/privatebin Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
privatebin/privatebin
|
Packagist |
≥ 1.7.7
< 2.0.3
|
2.0.3
|
References
Frequently Asked Questions
What is CVE-2025-64711?
Which Privatebin/privatebin versions are affected?
What version fixes CVE-2025-64711?
Is privatebin/privatebin affected?
What is the CVSS score of CVE-2025-64711?
What CWE is associated with CVE-2025-64711?
How can I check Packagist dependencies for CVE-2025-64711?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-r9x7-7ggj-fx9f",
"modified" : "2025-11-27T08:46:22Z",
"published" : "2025-11-14T20:33:52Z",
"aliases" : [ "CVE-2025-64711" ],
"summary" : "PrivateBin vulnerable to malicious filename use for self-XSS / HTML injection locally for users",
"details" : "## Summary\n\nDragging 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.\n\n**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.\n\n**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.\n\n## Affected versions\n\nPrivateBin versions since 1.7.7 and before 2.0.3.\n\n## Conditions\n\n* Only macIOS or Linux users are affected, due to the way the `>` character is treated in a file name on Windows.\n* The PrivateBIn instance needs to have file upload enabled.\n* An attacker needs to have access to the local file system or somehow convince the user to create (or download) a malicious file (name).\n* An attacker needs to convince the user to attach that malicious file to PrivateBin.\n\n## Impact\n\nAny 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.\n\nIf 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.\n\n### Real-life impact\n\nAs 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.\n\n## Technical Description\n\nWhen a file is dropped, `readFileData` collects all filenames and calls `printDragAndDropFileNames`:\n\n```js\nconst fileNames = loadedFiles.map((loadedFile => loadedFile.name));\nprintDragAndDropFileNames(fileNames);\n```\n\n`printDragAndDropFileNames` then renders those names:\n\n```js\n function printDragAndDropFileNames(fileNames) {\n $dragAndDropFileNames.html(fileNames.join('<br>'));\n }\n```\n\nThis will insecurely render the user-submitted filenames as HTML.\n\nThis vulnerability has been introduced in [this commit](https://github.com/PrivateBin/PrivateBin/commit/095a5be0b6390a6e47b97d3668a23f6edec95c15) (introduced in 1.7.7).\n\nThe previous render method was using `.text()`:\n\n```js\n$dragAndDropFileName.text(loadedFile.name);\n```\n\n## Reproduction Steps\n\n1. 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'`.\n2. Deploy or use any PrivateBin instance with attachments enabled (including https://privatebin.net/).\n3. Open the UI in a browser and start a new paste.\n4. Drag the crafted file anywhere on the page\n5. As soon as it is dropped, the filename is inserted into `#dragAndDropFileName` as HTML and the onerror handler fires (assuming CSP is disabled), showing the alert.\n\n## Mitigation\n\nPrivateBin strongly recommends users to **upgrade to the latest release**. However, here are some workarounds that may help users to mitigate this vulnerability without upgrade:\n\n* Update the [CSP in your configuration file](https://github.com/PrivateBin/PrivateBin/wiki/Configuration#cspheader) to the latest recommended settings and check that it isn't getting reverted or overwritten by the web server, reverse proxy or CDN, i.e. using [PrivateBin's offered check service](https://privatebin.info/directory/check).\n **Note:** Users should check the CSP independently, even if they've upgrade to a fixed version.\n* Deploying PrivateBin on a separate domain may limit the scope of the vulnerability to PrivateBin itself and thus, as described in the “Impact” section, effectively prevent any damage by the vulnerability to other resources users are hosting.\n* As explained in the impact assessment, disabling attachments also prevents this issue.\n\n### Patches\n\nThe issue has been patched in version 2.0.3.\n\n## Credits\n\nPrivateBin would like to thank [Benoit Esnard](https://github.com/esnard), who reported this vulnerability.\n\nIn general, PrivateBin would like to thank everyone reporting issues and potential vulnerabilities.\n\nIf a user thinks they have found a vulnerability or potential security risk, [PrivateBin would kindly ask you to follow our security policy](https://github.com/PrivateBin/PrivateBin/blob/master/SECURITY.md) and report it. PrivateBin will then assess the report and will take the necessary actions to address it.\n\n## Timeline\n\n- 2025-11-09 Received report via GitHub Security Advisory\n- 2025-11-10 Discussed and reproduced issue, created a patch\n- 2025-11-11 Further work on patch\n- 2025-11-12 Released patch with PrivateBin 2.0.3",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "privatebin/privatebin"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.7.7"
}, {
"fixed" : "2.0.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/PrivateBin/PrivateBin/security/advisories/GHSA-r9x7-7ggj-fx9f"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-64711"
}, {
"type" : "WEB",
"url" : "https://github.com/PrivateBin/PrivateBin/commit/f9550e513381208b36595ee2404e968144bba78b"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/PrivateBin/PrivateBin"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2025-11-14T20:33:52Z",
"nvd_published_at" : "2025-11-13T03:16:29Z"
}
}