PrivateBin: Reflected JSON injection in backend responses via unescaped REQUEST_URI
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- None · None · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| PrivateBin | PrivateBin | before 2.0.5 | 2.0.5 | Patch available | CNA |
| — | privatebin/privatebin (Packagist) | before 2.0.5 | 2.0.5 | Patch available | GHSA-xrjc-c68j-hp7w |
- PrivateBin VendorPrivateBin Affected before 2.0.5 Fixed in 2.0.5 Patch available CNA
- privatebin/privatebin (Packagist) Vendor— Affected before 2.0.5 Fixed in 2.0.5 Patch available GHSA-xrjc-c68j-hp7w
CPE names Threatist (inferred) · 1
Inferred from how NVD named this product before; not given by a source.
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:privatebin:privatebin:*:*:*:*:*:*:*:* | — | — | PrivateBin |
- cpe:2.3:a:privatebin:privatebin:*:*:*:*:*:*:*:* Versions — — ·PrivateBin
Remediation
- Fix · CNA PrivateBin (PrivateBin) Fixed in 2.0.5
- Fix · GHSA-xrjc-c68j-hp7w privatebin/privatebin (Packagist) Fixed in 2.0.5 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-55891
- 2026-10-03 Alias added: GHSA-xrjc-c68j-hp7w
References
Other 5
- https://github.com/PrivateBin/PrivateBin/security/advisories/GHSA-xrjc-c68j-hp7w
- https://github.com/PrivateBin/PrivateBin/commit/164c839c39688533ef0086575878e8392cd21249
- https://github.com/PrivateBin/PrivateBin/releases/tag/2.0.5
- https://github.com/PrivateBin/PrivateBin/commit/75f056dcda955d94c17ec5a4f8c54a9b7bfcee07
- https://github.com/PrivateBin/PrivateBin
More PrivateBin vulnerabilities
- TI-2022-08646 Persistent Cross-site Scripting (XSS) vulnerability in PrivateBin CVSS 3.1HIGH 8.2
- TI-2025-38979 PrivateBin persistent HTML injection in attachment filename enables redirect and defacement CVSS 3.1MEDIUM 5.8
- TI-2025-40057 PrivateBin vulnerable to malicious filename use for self-XSS / HTML injection locally for users CVSS 3.1MEDIUM 5.4
- TI-2025-40060 PrivateBin's template-switching feature allows arbitrary local file inclusion through path traversal CVSS 3.1MEDIUM 5.8
- TI-2024-26793 PrivateBin allows shortening of URLs for other domains CVSS 3.1MEDIUM 5.3
- TI-2020-04279 Persistent XSS vulnerability in filename of attached file in PrivateBin CVSS 3.1MEDIUM 6.1
Sources
- CVE-2026-55891 · CVE Program
- CVE-2026-55891 · NVD
- FIRST EPSS
- GHSA-xrjc-c68j-hp7w · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences