The HTTP parser in all current versions of Node.js...
Moderate severity
Unreviewed
Published
May 13, 2022
to the GitHub Advisory Database
•
Updated Feb 1, 2023
Description
Published by the National Vulnerability Database
May 17, 2018
Published to the GitHub Advisory Database
May 13, 2022
Last updated
Feb 1, 2023
The HTTP parser in all current versions of Node.js ignores spaces in the
Content-Length
header, allowing input such asContent-Length: 1 2
to be interpreted as having a value of12
. The HTTP specification does not allow for spaces in theContent-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 forContent-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.References