Insecure header validation in slim/psr7
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- None · Low · Low
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| slimphp | Slim-Psr7 | before 1.6.1 | 1.6.1 | Patch available | CNA |
| — | slim/psr7 (Packagist) | 1.6 to before 1.6.1 | 1.6.1 | Patch available | GHSA-q2qj-628g-vhfw |
| — | slim/psr7 (Packagist) | 1.5 to before 1.5.1 | 1.5.1 | Patch available | GHSA-q2qj-628g-vhfw |
| — | slim/psr7 (Packagist) | before 1.4.1 | 1.4.1 | Patch available | GHSA-q2qj-628g-vhfw |
- Slim-Psr7 Vendorslimphp Affected before 1.6.1 Fixed in 1.6.1 Patch available CNA
- slim/psr7 (Packagist) Vendor— Affected 1.6 to before 1.6.1 Fixed in 1.6.1 Patch available GHSA-q2qj-628g-vhfw
- slim/psr7 (Packagist) Vendor— Affected 1.5 to before 1.5.1 Fixed in 1.5.1 Patch available GHSA-q2qj-628g-vhfw
- slim/psr7 (Packagist) Vendor— Affected before 1.4.1 Fixed in 1.4.1 Patch available GHSA-q2qj-628g-vhfw
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:slimframework:slim_psr-7:*:*:*:*:*:*:*:* | before 1.6.1 | Vulnerable | Slimframework |
- cpe:2.3:a:slimframework:slim_psr-7:*:*:*:*:*:*:*:* Versions before 1.6.1 Vulnerable ·Slimframework
Remediation
- Fix · CNA Slim-Psr7 (slimphp) Fixed in 1.6.1
- Fix · GHSA-q2qj-628g-vhfw slim/psr7 (Packagist) Fixed in 1.6.1 Advisory →
- Fix · GHSA-q2qj-628g-vhfw slim/psr7 (Packagist) Fixed in 1.5.1 Advisory →
- Fix · GHSA-q2qj-628g-vhfw slim/psr7 (Packagist) Fixed in 1.4.1 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2023-30536
- 2026-10-03 Alias added: GHSA-q2qj-628g-vhfw
References
Advisory 2
Other 6
- https://www.rfc-editor.org/rfc/rfc7230#section-3.2.4
- https://github.com/slimphp/Slim-Psr7/issues/284#issuecomment-1541328898
- https://github.com/slimphp/Slim-Psr7
- https://github.com/slimphp/Slim-Psr7/releases/tag/1.4.1
- https://github.com/slimphp/Slim-Psr7/releases/tag/1.5.1
- https://github.com/slimphp/Slim-Psr7/releases/tag/1.6.1
More slimphp vulnerabilities
- TI-2026-35593 Slim has Reflected XSS in the HtmlErrorRenderer CVSS 3.1MEDIUM 6.1
Sources
- CVE-2023-30536 · CVE Program
- CVE-2023-30536 · NVD
- FIRST EPSS
- GHSA-q2qj-628g-vhfw · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences