nodejs/undici · Security
CRLF Injection in Nodejs ‘undici’ via host
- GHSA ID
- GHSA-5r9g-qh6m-jxff
- CVE ID
- CVE-2023-23936
- Severity
- medium
- Published
- Updated
- CVSS
- 4.6 · CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N
- CVSS v3
- 4.6 · CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N
Description
Impact
undici library does not protect host HTTP header from CRLF injection vulnerabilities.
Patches
This issue was patched in Undici v5.19.1.
Workarounds
Sanitize the headers.host string before passing to undici.
References
Reported at https://hackerone.com/reports/1820955.
Credits
Thank you to Zhipeng Zhang (@timon8) for reporting this vulnerability.
CWEs
- CWE-74 · Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
- CWE-93 · Improper Neutralization of CRLF Sequences ('CRLF Injection')
References
- https://github.com/nodejs/undici/security/advisories/GHSA-5r9g-qh6m-jxff ↗
- https://nvd.nist.gov/vuln/detail/CVE-2023-23936 ↗
- https://github.com/nodejs/undici/commit/a2eff05401358f6595138df963837c24348f2034 ↗
- https://hackerone.com/reports/1820955 ↗
- https://github.com/nodejs/undici/releases/tag/v5.19.1 ↗
- https://github.com/advisories/GHSA-5r9g-qh6m-jxff ↗