/

CVE-2026-48979

Severity:

HIGH RISK

(7.5)

HTTP/2 Request Smuggling (CWE-444) in PSL H2 Server

CVE-2026-48979

Awaiting Analysis

Vulnerability type

Category:

HTTP Request Smuggling

CWE:

CWE-444

Impact:

Request Smuggling and Application-layer Bypass

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A request smuggling flaw in PSL's Psl\H2\ServerConnection allows HTTP/2 clients to send DATA frames whose size does not match the content-length declared in HEADERS frames.

When applications trust the declared content length, a malicious client can sneak additional bytes past application-level limits or truncate requests early, leading to confused message boundaries and incorrect server behavior.

Affected context

This vulnerability affects deployments that:

  • Use PHP Standard Library (PSL) versions 6.1.0, 6.1.1, or 6.2.0
  • Call Psl\H2\ServerConnection directly to accept untrusted HTTP/2 client traffic
  • Rely on the content-length header for enforcing request size limits or parsing message bodies

Environments that only use higher-level, documented PSL APIs which wrap HTTP/2 handling are described as not affected, assuming they do not expose raw ServerConnection semantics.

Exploit preconditions

  • Attack surface: Network-exposed HTTP/2 endpoints implemented using Psl\H2\ServerConnection
  • Required access: Ability to establish a client connection and send crafted HTTP/2 HEADERS and DATA frames
  • Trigger point: The server receives a content-length in HEADERS that is inconsistent with the total number of DATA frame bytes on the stream
  • Why exploitation is possible: The implementation does not enforce that the cumulative DATA payload length exactly matches the declared content-length, violating RFC 9113 §8.1.1 and allowing extra or missing bytes to be interpreted incorrectly by application code.

Why this happens

The core issue is a protocol validation flaw in the HTTP/2 server implementation.

Psl\H2\ServerConnection accepts incoming HEADERS with a content-length header but fails to track and enforce that the sum of all DATA frames on the stream equals this value.

This maps to CWE-444: Inconsistent Interpretation of HTTP Requests, where lower-level parsing and higher-level application logic disagree on message boundaries and size, enabling request smuggling and confusion between layers.

Potential impact

  • Bypassing application-level request size limits or payload validation by smuggling additional bytes after the declared content-length
  • Causing application logic to parse concatenated or partially hidden requests as a single request
  • Triggering incorrect business logic decisions due to truncated bodies or mismatched metadata
  • Facilitating cache pollution or cache poisoning when smuggled data influences how upstream or downstream components interpret requests
  • Potential abuse of downstream services that rely on the original content-length for parsing

General mitigation guidance

Mitigation patterns focus on strict protocol compliance and reducing trust in client-declared metadata:

  • Enforce that the total DATA bytes for a stream exactly match the content-length declared in HEADERS before exposing the body to application code.
  • Reject or abort streams where more bytes than declared are received, or where the stream ends before the declared count is met.
  • Normalize and validate HTTP/2 semantics at a single layer, ensuring that higher layers never reinterpret request boundaries independently.
  • Implement conservative maximum request body sizes at the protocol handler layer, independent of client-declared lengths.
  • Prefer using well-vetted, higher-level HTTP server abstractions instead of directly handling low-level HTTP/2 frames where possible.

How teams detect issues like this

Organizations can approach detection and verification using:

  • Code review: Inspect HTTP/2 server code paths to ensure that body length accounting is tied to content-length and that mismatches cause hard failures.
  • Static analysis: Define rules that flag I/O code which trusts content-length or similar metadata without enforcing correspondence with actual bytes read.
  • Dynamic testing: Use integration or fuzz testing to send HEADERS/DATA combinations with mismatched lengths and confirm that the server rejects them consistently.
  • Security testing policies: Require protocol compliance test suites for custom transport or framing layers, especially when implementing HTTP/2 or other multiplexed protocols.

Sources

SourceLink
github.comgithub.com/php-standard-library/php-standard-library/releases/tag/6.1.2
github.comgithub.com/php-standard-library/php-standard-library/releases/tag/6.2.1
github.comgithub.com/php-standard-library/php-standard-library/security/advisories/GHSA-pw9p-jvrm-f7rm

Frequently asked

questions

Yes. Any client that can open an HTTP/2 connection to a service using Psl\H2\ServerConnection directly can attempt to exploit the mismatch between content-length and actual DATA bytes.

The attacker only needs network access to the affected HTTP/2 endpoint; no prior authentication is inherently required unless the application adds it.

The safest approach is to enforce strict equality between the declared content-length and the total DATA payload on each HTTP/2 stream, rejecting or aborting streams on any mismatch and centralizing length enforcement at the protocol layer.

Future implementations should follow relevant RFCs rigorously, centralize protocol parsing and validation, add automated tests for malformed and boundary-case frames, and avoid duplicating message boundary logic across multiple layers.

Find out what's already
exploitable in your codebase.