CVE-2023-30536Insecure header validation in slim/psr7
slim/psr7 is a PSR-7 implementation for use with Slim 4. In versions prior to 1.6.1 an attacker could sneak in a newline (\n) into both the header names and values. While the specification states that \r\n\r\n is used to terminate the header list, many servers in the wild will also accept \n\n. An attacker that is able to control the header names that are passed to Slilm-Psr7 would be able to intentionally craft invalid messages, possibly causing application errors or invalid HTTP requests being sent out with an PSR-18 HTTP client. The latter might present a denial of service vector if a remote service’s web application firewall bans the application due to the receipt of malformed requests. The issue has been patched in version 1.6.1. There are no known workarounds to this issue. Users are advised to upgrade.
What to do
Fixed builds are available from Debian, Packagist: see the table below for the fixed version per release.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 25.10 | php-slim-psr7 | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | php-slim-psr7 | Not affected vulnerable_code_not_present | ||
| Debian 14 | php-slim-psr7 | Fixed | 1.6.1-1 | DEBIAN-CVE-2023-30536 |
| Debian 13 | php-slim-psr7 | Fixed | 1.6.1-1 | DEBIAN-CVE-2023-30536 |
| Debian 12 | php-slim-psr7 | Fixed | 1.6.1-1 | DEBIAN-CVE-2023-30536 |
| Packagist library | slim/psr7 | Fixed | 1.4.1 | GHSA-q2qj-628g-vhfw |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- slimphp Slim-Psr7: affected: < 1.6.1
References
- https://github.com/slimphp/Slim-Psr7/security/advisories/GHSA-q2qj-628g-vhfw
- https://github.com/slimphp/Slim-Psr7/commit/ed1d553225dd190875d8814c47460daed4b550bb
- https://www.rfc-editor.org/rfc/rfc7230#section-3.2.4
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.