CVE-2023-30536 Insecure header validation in slim/psr7
Attackers can inject newlines into headers causing malformed requests and potential denial of service via WAF bans.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2023-30536?
CVE-2023-30536 is a medium-severity vulnerability in slimphp Slim-Psr7, published on 17 Apr 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
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.
Weakness: CWE-436
Which versions are affected by CVE-2023-30536?
6 open source packages ship an affected version, including slim/psr7. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
slim/psr7 Packagist | All versions | 1.4.1 |
slim/psr7 Packagist | All versions | 1.4.1 |
slim/psr7 Packagist | From 1.5 | 1.5.1 |
slim/psr7 Packagist | From 1.5 | 1.5.1 |
slim/psr7 Packagist | From 1.6 | 1.6.1 |
slim/psr7 Packagist | From 1.6 | 1.6.1 |
Products include Slimframework Slim Psr-7.
How do I fix CVE-2023-30536?
Upgrade slim/psr7 to a fixed version for your release line: 1.4.1, 1.5.1 or 1.6.1.
Is CVE-2023-30536 being exploited?
There is no known exploitation of CVE-2023-30536 in the wild and no public exploit code.
Sources
Also known as DEBIAN-CVE-2023-30536, GHSA-q2qj-628g-vhfw.