CVE-2023-30536 — Insecure header validation in slim/psr7 — CVE Details
Insecure header validation in slim/psr7
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.83%). Schedule for your next planned update.
Does your project use an affected slim/psr7 version?
Paste your composer.lock to check it for CVE-2023-30536 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Impact
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.
Patches
The issue is patched in 1.6.1, 1.5.1, and 1.4.1.
Workarounds
In Slim-Psr7 prior to 1.6.1, 1.5.1, and 1.4.1, validate HTTP header keys and/or values, and if using user-supplied values, filter them to strip off leading or trailing newline characters before calling withHeader().
Acknowledgments
We are very grateful to and thank Graham Campbell for reporting and working with us on this issue.
References
- Guzzle: CVE-2023-29197, with advisory GHSA-wxmh-65f7-jcvw
- Laminas Diactoros: CVE-2023-29530, with advisory GHSA-xv3h-4844-9h36
- https://www.rfc-editor.org/rfc/rfc7230#section-3.2.4
Advisory Timeline
- First published April 18, 2023 (1318 days ago).
- Last revised September 10, 2026 — 1240 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
composer require "slim/psr7:^1.6.1"
composer require "slim/psr7:^1.4.1"
composer require "slim/psr7:^1.5.1"
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (3)
Affects 1 ecosystem: Packagist (1).
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-436
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 6.5 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
References
- https://github.com/slimphp/Slim-Psr7/security/advisories/GHSA-q2qj-628g-vhfwWEB
- https://nvd.nist.gov/vuln/detail/CVE-2023-30536ADVISORY
- https://github.com/slimphp/Slim-Psr7/issues/284#issuecomment-1541328898WEB
- https://github.com/slimphp/Slim-Psr7/commit/ed1d553225dd190875d8814c47460daed4b550bbWEB
- https://github.com/slimphp/Slim-Psr7PACKAGE
- https://github.com/slimphp/Slim-Psr7/releases/tag/1.4.1WEB
- https://github.com/slimphp/Slim-Psr7/releases/tag/1.5.1WEB
- https://github.com/slimphp/Slim-Psr7/releases/tag/1.6.1WEB
- https://www.rfc-editor.org/rfc/rfc7230#section-3.2.4WEB
Frequently Asked Questions
- What is CVE-2023-30536?
- Insecure header validation in slim/psr7. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 6.5/10).
- How do I check if my project is affected by CVE-2023-30536?
- CVE-2023-30536 affects slim/psr7. It has a 0.8% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2023-30536 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions, or the impact is limited.
This is an above-median EPSS score — 54.6% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2026-75592MEDIUM
Kirby: Access to image files outside of the site root via path traversal in the media handling
- CVE-2026-88023MEDIUM
MongoDB: GridFS data disclosure and deletion via query-operator injection in file IDs