CRLF injection in node-tar - #VU170769
Published: November 28, 2026
Vulnerability details
The vulnerability allows a remote attacker to forge archive entry attributes, overwrite files within the extraction directory, and execute arbitrary code during npm installation on Windows.
The vulnerability exists due to improper newline handling in the node-tar PAX parser when it treats embedded newlines as record boundaries instead of honoring declared byte lengths. A remote attacker can supply a crafted archive or influence filenames before archiving to redirect extracted files, including overwriting a package manifest so npm runs an injected postinstall script on Windows.