Skip to main content

PrivateBin EUVDEUVD-2026-67940

| CVE-2026-55891 LOW
Improper Encoding or Escaping of Output (CWE-116)
2026-08-28 https://github.com/PrivateBin/PrivateBin GHSA-xrjc-c68j-hp7w
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft HTTP request with raw double-quote character in URI
  2. Delivery
    Send via non-normalizing HTTP client or structured-data crawler
  3. Exploit
    FILTER_SANITIZE_URL passes quote through unmodified
  4. Execution
    str_replace() splices unescaped URI into JSON-LD template
  5. Persist
    Attacker-controlled JSON fields reflected in application/ld+json response
  6. Impact
    CORS-open, nosniff-absent response consumed by cross-origin client or automated processor

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding for downstream
Exploitation Conditions

The attacker must issue an HTTP request in which the URI contains a literal double-quote character (0x22) that is not percent-encoded to %22 by any client or intermediary proxy in the request path. All major web browsers (Chrome, Firefox, Safari, Edge) percent-encode double quotes in address bars, making browser-initiated exploitation impossible through normal navigation - a user cannot be social-engineered into triggering this via a hyperlink in a browser. Exploitation is limited to raw TCP sockets, HTTP libraries (curl, Python requests, Go net/http, etc.), automated link-preview services, and semantic-web crawlers - all of which are typically under attacker control. No authentication is required and no special server-side configuration is needed; the /?jsonld= endpoint is present and active in all default PrivateBin installations. Exploitation is bounded to JSON-LD response manipulation; no file read, privilege escalation, or code execution path is reachable through this vulnerability in isolation.

Impact

The provided CVSS vector (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N) carries a score of N/A with zero impact subscores, confirming it is an unscored placeholder - NVD assessment appears incomplete at time of analysis. This issue is absent from CISA KEV and EPSS data is not available. The 'RCE' tag in the source intelligence is a mis-classification: the advisory explicitly states no direct script execution was demonstrated, and no code execution path is described. Real-world impact is constrained: browsers universally percent-encode double-quote characters in address bars, meaning the injection is not reachable through standard browser navigation and cannot be triggered by tricking a user into clicking a link. Exploitation requires a raw socket, HTTP library, or automated structured-data crawler that passes the literal character. The CORS wildcard header means any cross-origin service consuming PrivateBin's JSON-LD context could receive and act on manipulated structured data. Practical risk is moderate for deployments whose JSON-LD endpoints are consumed by automated tools; minimal for browser-only access patterns. The missing nosniff header is a defense-in-depth gap rather than an independent attack surface.

Exploit ScenarioDerived

An attacker using curl, Python's requests library, or any HTTP client that does not normalize URI characters sends GET /?jsonld=types&x="injected":"pwned","y":" HTTP/1.1 to a PrivateBin instance. The server reflects the raw quotes into the JSON-LD template, producing a structurally malformed document with attacker-controlled fields under the @context namespace, served with Access-Control-Allow-Origin: * and without X-Content-Type-Options: nosniff - making it fetachable by any cross-origin structured-data processor or link-preview service. The advisory's proof-of-concept confirms the raw reflection on v2.0.4.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 28, 2026

Reflected JSON injection in PrivateBin v2.0.4 and earlier allows remote unauthenticated attackers to inject arbitrary key/value pairs into JSON-LD API responses served at the /?jsonld= endpoint. PHP's FILTER_SANITIZE_URL passes double-quote characters through unmodified into JSON template construction via str_replace(), breaking out of the JSON string context and reflecting attacker-controlled fields. The vulnerable response path additionally omits X-Content-Type-Options: nosniff while setting Access-Control-Allow-Origin: *, enabling any cross-origin structured-data consumer to read the manipulated output. No public exploit or KEV listing exists, though the advisory includes a dynamically verified proof-of-concept on v2.0.4.

RemediationAI

Upgrade to PrivateBin 2.0.5, available at https://github.com/PrivateBin/PrivateBin/releases/tag/2.0.5. The fix (commit 75f056dcda955d94c17ec5a4f8c54a9b7bfcee07) changes getRequestUri() to return only the URL path via parse_url($uri, PHP_URL_PATH), ensuring query parameters never enter JSON template construction. If immediate upgrade is not feasible, a reverse proxy or WAF rule that rejects or percent-encodes literal double-quote characters (0x22) in request URIs before they reach the PHP application will block the injection vector; note that this may reject requests from some legitimate structured-data crawlers. There is no configuration setting to disable the /?jsonld= endpoint without modifying routing code, so network-layer filtering is the only practical workaround short of patching.

Affected VersionsENISA

PrivateBin < 2.0.5

Affected Packages

composer privatebin/privatebin fix: 2.0.5
euvd privatebin fix: 2.0.5

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in composer, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

PrivateBin is a PHP self-hosted pastebin application. The flaw resides in Controller::_jsonld(), which builds JSON-LD (Linked Data) responses by reading static template files (js/types.jsonld, js/paste.jsonld) and inserting the server base URL via str_replace(). That base URL is derived from $_SERVER['REQUEST_URI'] filtered through PHP's FILTER_SANITIZE_URL - a filter documented to permit double-quote characters, since it targets syntactic URL characters rather than JSON-special characters. The result is that the attacker-controlled query string, including literal quote characters, flows unescaped through Controller::$_urlBase directly into a JSON string value without json_encode() or any equivalent escaping, satisfying CWE-116 (Improper Encoding or Escaping of Output). The jsonld routing case additionally returns early before the standard _view() security-header pipeline executes, producing the only response in the application lacking X-Content-Type-Options: nosniff. The fix in v2.0.5 (commit 75f056dc) changes getRequestUri() to return only the path component via parse_url($uri, PHP_URL_PATH), discarding query parameters that carry attacker-supplied content. Affected CPE: pkg:composer/privatebin/privatebin versions up to and including 2.0.4.

Know when PHP gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/PrivateBin/PrivateBin) PRIMARY 0.0 NONE
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
vuln.today AI 5.3 MEDIUM

Network-reachable with no authentication; integrity impact is limited to JSON-LD response manipulation with no confidentiality or availability impact demonstrated.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/PrivateBin/PrivateBin).

CVSS VectorVendor: https://github.com/PrivateBin/PrivateBin

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
None

DescriptionCVE.org

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 request to the target PrivateBin instance whose request-target contains a raw " character, e.g.:

GET /?jsonld=types&x="injected":"pwned","y":" HTTP/1.1 (delivered via a raw socket / HTTP client that doesn't normalize the request line - most browsers percent-encode " in the address bar, but many HTTP libraries, proxies, and automated link-preview/structured-data crawlers do not).

  1. The server reflects the raw value into the JSON-LD response, producing a syntactically broken / attacker-extended JSON document.
  2. Because Access-Control-Allow-Origin: * is set and X-Content-Type-Options: nosniff is missing on this path, any origin can fetch and rely on this manipulated content, and the response loses the defense-in-depth MIME-sniffing protection applied everywhere else in the app.

Impact

Reflected, unauthenticated injection of attacker-controlled content into a CORS-open application/ld+json response, plus a missing X-Content-Type-Options: nosniff header on this single response path (present everywhere else). No direct script execution was demonstrated on current browsers (this content type is generally not HTML-sniffed), but it is a real output-encoding bug (CWE-116) and a defense-in-depth gap that could be exploited by structured-data consumers or in combination with other issues / less-strict clients.

Vulnerable Code

php
$content = str_replace(
    '?jsonld=',
    $this->_urlBase . '?jsonld=',
    file_get_contents($file)
);
...
header('Content-type: application/ld+json');

Verification

Dynamically confirmed on v2.0.4 (commit 597a6f0) via php -S 127.0.0.1:8082 index.php:

Request:

http
GET /?jsonld=types&x="injected":"pwned","y":" HTTP/1.1
Host: 127.0.0.1:8082
Connection: close

Unpatched response body (excerpt):

json
"pb": "/?jsonld=types&x="injected":"pwned","y":"?jsonld=types#"
  • i.e. the " characters are reflected raw, breaking the JSON structure, and X-Content-Type-Options is absent from the response headers.

After applying the fix above, the same request returns:

json
"pb": "/?jsonld=types&x=\"injected\":\"pwned\",\"y\":\"?jsonld=types#"

with X-Content-Type-Options: nosniff present, and the existing JsonApiTest::testJsonLd* unit test expectations (/?jsonld=...) remain unchanged for normal requests.

Credits

This vulnerability was reported by Iaohkut, @alanturing881, which PrivateBin would like to thank for that. In general, PrivateBin would like to thank everyone reporting issues and potential vulnerabilities to it.

If you think you have found a vulnerability or potential security risk, we'd kindly ask you to follow our security policy and report it to us. PrivateBin then assess the report and will take the actions PrivateBin deem necessary to address it.

Threat Intelligence Overview

EPSS Score
0.3%
Top 75% exploitable
Prevalence
Medium
popular self-hosted open-source pastebin, privacy-focused community deployments
Threat Intel
1
1 sources
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Low
Technical Impact
Partial

Attack Technique

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

More in PHP

View all
CVE-2019-11043 CRITICAL POC
9.8 Oct 28

In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it

CVE-2012-1823 CRITICAL POC
9.8 May 11

sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not

CVE-2016-1555 CRITICAL POC
9.8 Apr 21

(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear

CVE-2018-11138 CRITICAL POC
9.8 May 31

The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by

CVE-2024-11680 CRITICAL POC
9.8 Nov 26

ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C

CVE-2025-49113 CRITICAL POC
9.9 Jun 02

Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au

CVE-2017-9841 CRITICAL POC
9.8 Jun 27

Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c

CVE-2025-0108 HIGH POC
8.8 Feb 12

Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers

CVE-2021-25298 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2021-25296 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2013-4983 CRITICAL POC
10.0 Sep 10

The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows

CVE-2023-6553 CRITICAL POC
9.8 Dec 15

The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy