Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: GSA_kwCzR0hTQS14djNoLTQ4NDQtOWgzNs4AAy8-
HTTP Multiline Header Termination
Impact
Affected versions of Laminas Diactoros accepted a single line feed (LF / \n
) character at the end of a header name. When serializing such a header name containing a line-feed into the on-the-wire representation of a HTTP/1.x message, the resulting message would be syntactically invalid, due to the header line being terminated too early. An attacker that is able to control the header names that are passed to Laminas Diactoros 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 problem has been patched in the following versions:
- 2.18.1
- 2.19.1
- 2.20.1
- 2.21.1
- 2.22.1
- 2.23.1
- 2.24.2
- 2.25.2
Workarounds
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()
.
References
- CVE-2023-29197
- GHSA-wxmh-65f7-jcvw
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS14djNoLTQ4NDQtOWgzNs4AAy8-
Source: GitHub Advisory Database
Origin: Unspecified
Severity: High
Classification: General
Published: about 1 year ago
Updated: 6 months ago
CVSS Score: 7.5
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Identifiers: GHSA-xv3h-4844-9h36, CVE-2023-29530
References:
- https://github.com/laminas/laminas-diactoros/security/advisories/GHSA-xv3h-4844-9h36
- https://nvd.nist.gov/vuln/detail/CVE-2023-29530
- https://github.com/laminas/laminas-diactoros/commit/7e721a60a09c5119c98694c2d23fc031094e1f1c
- https://github.com/advisories/GHSA-wxmh-65f7-jcvw
- https://lists.fedoraproject.org/archives/list/[email protected]/message/BPW54QK7ISDALPLP2CKODU4ZIVRYS336/
- https://github.com/advisories/GHSA-xv3h-4844-9h36
Blast Radius: 31.3
Affected Packages
packagist:laminas/laminas-diactoros
Dependent packages: 825Dependent repositories: 15,115
Downloads: 63,564,634 total
Affected Version Ranges: >= 2.25.0, < 2.25.2, >= 2.24.0, < 2.24.2, = 2.23.0, = 2.22.0, = 2.21.0, = 2.20.0, = 2.19.0, < 2.18.1
Fixed in: 2.25.2, 2.24.2, 2.23.1, 2.22.1, 2.21.1, 2.20.1, 2.19.1, 2.18.1
All affected versions: 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.2.0, 1.2.1, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.8, 1.3.9, 1.3.10, 1.3.11, 1.4.0, 1.4.1, 1.5.0, 1.6.0, 1.6.1, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.5, 1.8.6, 1.8.7, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.3.0, 2.3.1, 2.3.2, 2.4.0, 2.4.1, 2.5.0, 2.5.1, 2.6.0, 2.7.0, 2.8.0, 2.9.0, 2.9.1, 2.9.2, 2.10.0, 2.11.0, 2.11.1, 2.11.2, 2.11.3, 2.12.0, 2.13.0, 2.14.0, 2.15.0, 2.16.0, 2.17.0, 2.18.0, 2.19.0, 2.20.0, 2.21.0, 2.22.0, 2.23.0, 2.24.0, 2.24.1, 2.25.0, 2.25.1
All unaffected versions: 2.18.1, 2.19.1, 2.20.1, 2.21.1, 2.22.1, 2.23.1, 2.24.2, 2.25.2, 2.26.0, 3.0.0, 3.1.0, 3.2.0, 3.3.0, 3.3.1