CVE-2026-55891 PrivateBin: Reflected JSON injection in backend responses via unescaped REQUEST_URI

None 0.0 Published Updated

Attackers can inject arbitrary JSON data into PrivateBin responses via unescaped REQUEST_URI, affecting structured-data consumers and bypassing security headers.

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

What is CVE-2026-55891?

CVE-2026-55891 is a code injection vulnerability in PrivateBin, published on 28 Aug 2026. 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. Prior to 2.0.5, Request::getRequestUri() in lib/Request.php passes $_SERVER['REQUEST_URI'] through FILTER_SANITIZE_URL, which does not remove quotation marks, angle brackets, or apostrophes, and Controller::_init() stores the attacker-controlled value in Controller::$_urlBase. Controller::_jsonld() in lib/Controller.php then uses str_replace() to insert that value without JSON escaping into js/types.jsonld, js/paste.jsonld, and the other JSON-LD templates used by /?jsonld= and /?pasteid. A raw quotation mark delivered by an HTTP client, proxy, or structured-data crawler that does not normalize the request target can break out of the JSON string and inject arbitrary key-value data into a CORS-open application/ld+json response. The jsonld branch in Controller::__construct() returns before _setCacheHeaders(), so the response also lacks X-Content-Type-Options: nosniff, Content Security Policy, X-Frame-Options, and Referrer-Policy. Direct script execution was not demonstrated, but manipulated responses can affect structured-data consumers or combine with less strict clients. This issue is fixed in version 2.0.5.

Weakness: CWE-116

Which versions are affected by CVE-2026-55891?

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

PackageAffectedFixed in
privatebin/privatebin PackagistAll versions2.0.5
privatebin/privatebin PackagistAll versions2.0.5

How do I fix CVE-2026-55891?

Upgrade privatebin/privatebin to 2.0.5 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-55891 being exploited?

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

Sources

Also known as GHSA-xrjc-c68j-hp7w.

Is CVE-2026-55891 in your software?

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

Check your SBOMs for free