GHSA-XV3H-4844-9H36
Vulnerability from github – Published: 2023-04-24 22:42 – Updated: 2023-04-28 20:07Impact
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
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "laminas/laminas-diactoros"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.18.1"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Packagist",
"name": "laminas/laminas-diactoros"
},
"ranges": [
{
"events": [
{
"introduced": "2.19.0"
},
{
"fixed": "2.19.1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.19.0"
]
},
{
"package": {
"ecosystem": "Packagist",
"name": "laminas/laminas-diactoros"
},
"ranges": [
{
"events": [
{
"introduced": "2.20.0"
},
{
"fixed": "2.20.1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.20.0"
]
},
{
"package": {
"ecosystem": "Packagist",
"name": "laminas/laminas-diactoros"
},
"ranges": [
{
"events": [
{
"introduced": "2.21.0"
},
{
"fixed": "2.21.1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.21.0"
]
},
{
"package": {
"ecosystem": "Packagist",
"name": "laminas/laminas-diactoros"
},
"ranges": [
{
"events": [
{
"introduced": "2.22.0"
},
{
"fixed": "2.22.1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.22.0"
]
},
{
"package": {
"ecosystem": "Packagist",
"name": "laminas/laminas-diactoros"
},
"ranges": [
{
"events": [
{
"introduced": "2.23.0"
},
{
"fixed": "2.23.1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.23.0"
]
},
{
"package": {
"ecosystem": "Packagist",
"name": "laminas/laminas-diactoros"
},
"ranges": [
{
"events": [
{
"introduced": "2.24.0"
},
{
"fixed": "2.24.2"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Packagist",
"name": "laminas/laminas-diactoros"
},
"ranges": [
{
"events": [
{
"introduced": "2.25.0"
},
{
"fixed": "2.25.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-29530"
],
"database_specific": {
"cwe_ids": [
"CWE-20"
],
"github_reviewed": true,
"github_reviewed_at": "2023-04-24T22:42:39Z",
"nvd_published_at": "2023-04-24T20:15:08Z",
"severity": "HIGH"
},
"details": "### Impact\n\nAffected 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\u2019s web application firewall bans the application due to the receipt of malformed requests.\n\n### Patches\n\nThe problem has been patched in the following versions:\n\n- 2.18.1\n- 2.19.1\n- 2.20.1\n- 2.21.1\n- 2.22.1\n- 2.23.1\n- 2.24.2\n- 2.25.2\n\n### Workarounds\n\nValidate 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()`.\n\n### References\n\n- CVE-2023-29197\n- GHSA-wxmh-65f7-jcvw",
"id": "GHSA-xv3h-4844-9h36",
"modified": "2023-04-28T20:07:40Z",
"published": "2023-04-24T22:42:39Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/laminas/laminas-diactoros/security/advisories/GHSA-xv3h-4844-9h36"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-29530"
},
{
"type": "WEB",
"url": "https://github.com/laminas/laminas-diactoros/commit/7e721a60a09c5119c98694c2d23fc031094e1f1c"
},
{
"type": "ADVISORY",
"url": "https://github.com/advisories/GHSA-wxmh-65f7-jcvw"
},
{
"type": "PACKAGE",
"url": "https://github.com/laminas/laminas-diactoros"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BPW54QK7ISDALPLP2CKODU4ZIVRYS336"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
],
"summary": "HTTP Multiline Header Termination"
}
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.