GHSA-3cvr-822r-rqcc

Suggest an improvement
Source
https://github.com/advisories/GHSA-3cvr-822r-rqcc
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/07/GHSA-3cvr-822r-rqcc/GHSA-3cvr-822r-rqcc.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-3cvr-822r-rqcc
Aliases
Published
2022-07-21T20:30:10Z
Modified
2023-11-08T04:09:27.728154Z
Severity
  • 5.3 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N CVSS Calculator
Summary
undici before v5.8.0 vulnerable to CRLF injection in request headers
Details

Impact

It is possible to inject CRLF sequences into request headers in Undici.

const undici = require('undici')

const response = undici.request("http://127.0.0.1:1000", {
  headers: {'a': "\r\nb"}
})

The same applies to path and method

Patches

Update to v5.8.0

Workarounds

Sanitize all HTTP headers from untrusted sources to eliminate \r\n.

References

https://hackerone.com/reports/409943 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-12116

For more information

If you have any questions or comments about this advisory:

Database specific
{
    "nvd_published_at": "2022-07-19T21:15:00Z",
    "cwe_ids": [
        "CWE-93"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2022-07-21T20:30:10Z"
}
References

Affected packages

npm / undici

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.8.0