Skip to main content

CVE-2023-30536 — Insecure header validation in slim/psr7 — CVE Details

MEDIUM

Insecure header validation in slim/psr7

Published April 18, 2023Updated September 10, 2026Source: OSV

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.

Check my composer.lock

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

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
Update slim/psr7 to 1.6.1 or later
composer require "slim/psr7:^1.6.1"
Composer
Update slim/psr7 to 1.4.1 or later
composer require "slim/psr7:^1.4.1"
Composer
Update slim/psr7 to 1.5.1 or later
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).

PackageFixed In
slim/psr7 Packagist · Affected: 1.61.6.1
slim/psr7 Packagist · Affected: 0.1.0, 0.2.0, 0.3.0, 0.4.0 (+7 more)1.4.1
slim/psr7 Packagist · Affected: 1.51.5.1

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 6.5 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
Low

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L

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

CVSS Score
6.5

Exploitation requires specific conditions, or the impact is limited.

EPSS Score (30-day exploit probability)
0.83%
EPSS percentile: 54.6

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

GHSA-q2qj-628g-vhfw

Related CVEs

  • CVE-2026-75592
    MEDIUM

    Kirby: Access to image files outside of the site root via path traversal in the media handling

  • CVE-2026-88023
    MEDIUM

    MongoDB: GridFS data disclosure and deletion via query-operator injection in file IDs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my composer.lock