lowVulnerability

CVE-2026-55891

## Vulnerability Details A reflected JSON injection allows an attacker to return arbitrary data in the JSON endpoints (like ` /?jsonld=` and `/?pasteid`). ### Root Cause `Request::getRequestUri()` sanitizes `$_SERVER['REQUEST_URI']` with `FILTER_SANITIZE_URL`: ```php public function getRequestUri() { $uri = array_key_exists('REQUEST_URI', $_SERVER) ? filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL) : ''; return empty($uri) ? '/' : $uri; } ``` `FILTER_SANITIZE_URL` does **not** strip `"`, `'`, `<`, `>` characters (per the PHP manual's allowed-character list for this filter). So the raw, attacker-controlled request URI (including query string) passes through almost unmodified into `Controller::$_urlBase` (set in `_init()`). In `Controller::_jsonld()`, `$_urlBase` is spliced directly into one of the static `.jsonld` templates (`js/types.jsonld`, `js/paste.jsonld`, etc.) with a plain `str_replace()`, without any JSON-escaping: ```php $content = str_replace( '?jsonld=', $this->_urlBase . '?jsonld=', file_get_contents($file) ); ... header('Content-type: application/ld+json'); header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Methods: GET'); echo $content; ``` A request URI containing a literal `"` therefore breaks out of the JSON string in the `"@context"."pb"` value and injects arbitrary attacker-controlled key/value pairs into the response body, which is served with `Content-Type: application/ld+json` and `Access-Control-Allow-Origin: *`. Additionally, the `jsonld` case in `Controller::__construct()` returns early: ```php case 'jsonld': $this->_jsonld($this->_request->getParam('jsonld')); return; ``` This bypasses `_setCacheHeaders()` and all of the security headers normally applied in `_view()` (notably `X-Content-Type-Options: nosniff`, CSP, `X-Frame-Options`, `Referrer-Policy`). So this is the only response path lacking `X-Content-Type-Options: nosniff`. ### Attack Scenario 1. An attacker crafts a r

Properties

ghsa_id
GHSA-xrjc-c68j-hp7w
summary
PrivateBin has reflected JSON injection in backend responses via unescaped REQUEST_URI
severity
low
cve_id
CVE-2026-55891
cvss_vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
is_ghsa_only
false
ghsa_published
2026-08-28T20:25:34Z
source_url
https://github.com/advisories/GHSA-xrjc-c68j-hp7w
ghsa_updated
2026-08-28T20:25:35Z

Related Entities (4)

HAS_WEAKNESS (1)

[Weakness]Improper Encoding or Escaping of Output

REPORTED_BY (1)

[Source]GitHub Advisory Database

VULNERABLE_TO (1)

[Software]composer/privatebin/privatebin

AFFECTS (1)

[Software]composer/privatebin/privatebin

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-55891 — Ninja Signal Threat Intelligence | Ninja Signal