# CVE-2026-55696: PrivateBin has stored Cross-Side-Scripting (XSS) vulnerability in attachment download link via dangerous MIME types with required user-interaction

> An attacker can inject malicious scripts via attachment MIME types, allowing code execution in the victim's browser if file uploads are enabled and CSP is weak.

- **Severity:** Medium 4.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 28 Aug 2026
- **Updated:** 31 Aug 2026
- **Also known as:** GHSA-f2xf-7x3g-4272

## What is CVE-2026-55696?

CVE-2026-55696 is a medium-severity cross-site scripting vulnerability in PrivateBin, published on 28 Aug 2026. An attacker can exploit it over the internet without logging in, 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. Prior to 2.0.5, AttachmentViewer.setAttachment in js/privatebin.js uses getAttachmentMimeType to accept attacker-controlled MIME types and uses getBlobUrl to create a same-origin blob before setting attachmentLink's href for the Download attachment link. The SVG-only sanitization branch updates only the preview blob, so text/html, image/svg, application/xhtml+xml, and text/xml attachments can remain active in the download blob. On an instance with fileupload = true and a weakened, stripped, or absent Content Security Policy, an anonymous attacker can create such an attachment, and a victim who opens the link in a new tab causes inline JavaScript to execute in the PrivateBin origin. The script can read origin-scoped local storage and issue same-origin requests, including requests to applications co-hosted on the same domain. This issue is fixed in version 2.0.5.

Weakness: CWE-80 (Improper Neutralization of Script-Related HTML Tags in a Web Page), CWE-79 (Improper Neutralization of Input During Web Page Generation)

## Which versions are affected by CVE-2026-55696?

2 open source packages ship an affected version, including privatebin/privatebin.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `privatebin/privatebin` | Packagist | All versions | 2.0.5 |
| `privatebin/privatebin` | Packagist | All versions | 2.0.5 |

## How do I fix CVE-2026-55696?

Upgrade privatebin/privatebin to 2.0.5 or later.

## Is CVE-2026-55696 being exploited?

There is no known exploitation of CVE-2026-55696 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-55696 and fix it if it is affected.

What it is: CVE-2026-55696 is a medium-severity cross-site scripting vulnerability in PrivateBin, published on 28 Aug 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-55696 in the wild and no public exploit code.

Affected packages and fixed versions:
- privatebin/privatebin (Packagist): affected all versions; fixed in 2.0.5
- privatebin/privatebin (Packagist): affected all versions; fixed in 2.0.5

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-2026-55696/ (Markdown: https://insights.sbomify.com/CVE-2026-55696/index.md)
```

## Sources

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

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