CVE-2025-62796 PrivateBin persistent HTML injection in attachment filename enables redirect and defacement

Medium 5.8 Published Updated

Attackers can inject persistent HTML via attachment filenames in PrivateBin, enabling redirects and defacement if attachments are enabled.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-62796?

CVE-2025-62796 is a medium-severity cross-site scripting vulnerability in PrivateBin, published on 28 Oct 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

PrivateBin is an online pastebin where the server has zero knowledge of pasted data. Versions 1.7.7 through 2.0.1 allow persistent HTML injection via the unsanitized attachment filename (attachment_name) when attachments are enabled. An attacker can modify attachment_name before encryption so that, after decryption, arbitrary HTML is inserted unescaped into the page near the file size hint, enabling redirect (e.g., meta refresh) and site defacement and related phishing attacks. Script execution is normally blocked by the recommended Content Security Policy, limiting confidentiality impact. The issue was introduced in 1.7.7 and fixed in 2.0.2. Update to 2.0.2 or later. Workarounds include enforcing the recommended CSP, deploying PrivateBin on a separate domain, or disabling attachments.

Weakness: CWE-80, CWE-79

Which versions are affected by CVE-2025-62796?

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

PackageAffectedFixed in
privatebin/privatebin PackagistFrom 1.7.72.0.2
privatebin/privatebin PackagistFrom 1.7.72.0.2

How do I fix CVE-2025-62796?

Upgrade privatebin/privatebin to 2.0.2 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-62796 being exploited?

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

Sources

Also known as GHSA-867c-p784-5q6g.

Is CVE-2025-62796 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free