VDB
Sign up
MEDIUM4.6

GHSA-5r9g-qh6m-jxff

CRLF Injection in Nodejs ‘undici’ via host

Quick fix

GHSA-5r9g-qh6m-jxff — undici: upgrade to the fixed version with the command below.

npm install undici@5.19.1

Details

### 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](https://hackerone.com/timon8)) for reporting this vulnerability.

Are you affected?

Enter the version of the package you're using.

Affected packages

npm/undici
Introduced in: 2.0.0Fixed in: 5.19.1
Fixnpm install undici@5.19.1

References