High

PHP Standard Library: HTTP/2 server-side missing content-length validation enables request smuggling

  • Disclosed: 26.06.2026
  • Updated: 11.10.2026 10:22

Impact

Psl\H2\ServerConnection does not validate that the total bytes received in DATA frames match the content-length header declared in the HEADERS frame, in violation of RFC 9113 §8.1.1.

A malicious client can:

  • Send more DATA bytes than declared, smuggling additional content past application-level size limits.
  • Send fewer DATA bytes than declared and close the stream early, causing applications that trust the declared length to behave incorrectly.

The vulnerability is only reachable for consumers using Psl\H2\ServerConnection directly to accept untrusted client traffic. The high-level Psl\HTTP\Server is in active development and was not yet released at the time of this advisory; consumers of documented high-level PSL APIs are not affected.

Patches

Fixed in 6.1.2 and 6.2.1.

  • Parses and validates the content-length header on incoming HEADERS (server-side only — clients do not enforce this per RFC 9110 §9.3.2).
  • Tracks cumulative DATA frame payload length per stream.
  • Throws StreamException on mismatch or overflow.

Regression tests landed in #781, 9 of the new tests fail against the pre-fix code, proving the validation boundary is enforced.

Workarounds

None at the protocol layer. Applications using Psl\H2\ServerConnection directly should upgrade.

Resources

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Composer package php-standard-library/h2 >= 6.1.0, < 6.1.2, >= 6.2.0, < 6.2.1 6.1.2, 6.2.1
Composer package php-standard-library/php-standard-library >= 6.1.0, < 6.1.2, >= 6.2.0, < 6.2.1 6.1.2, 6.2.1

References

CVSS score 7.5/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Weakness (CWE)
CWE-444
Platform
Composer
Package
php-standard-library/h2, php-standard-library/php-standard-library
Disclosed
26.06.2026
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-pw9p-jvrm-f7rm - CC BY 4.0

Vulnerability history: php-standard-library/php-standard-library

All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.

This is the only known vulnerability of this package.

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.