Advisory

GHSA-3cvr-822r-rqcc

Also known as: CVE-2022-31150

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:

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2022-07-21 20:30 UTC
Modified
2023-11-08 04:09 UTC

Affected packages and fixes

undici

npm · All systems

Affected

  • introduced 0, fixed 5.8.0 (semver)

Fixed versions

5.8.0

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences