Authorization Bypass in Node.js due to Trailing White Space in HTTP Header Values

nodejs Updated 02 Oct 2025

Summary

07/02/2020
N/A
Yes i
Critical
9.8

CVE-2019-15606: Including trailing white space in HTTP header values in Nodejs 10, 12, and 13 causes bypass of authorization based on header value comparisons. Affects nodejs across 2 version ranges.

< 10.19.0-r0 >= cf41627411886000429bde058a6594fb7f6d6d47, < 5ba7df3c4b81ab695029dacf34a0aa960be71372

Fixed in 10.19.0-r0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Node.js is a popular JavaScript runtime built on Chrome's V8 JavaScript engine. It allows developers to build scalable and high-performance applications. However, versions 10, 12, and 13 of Node.js are vulnerable to an authorization bypass issue when trailing white space is included in HTTP header values. This vulnerability can lead to unauthorized access to protected resources.

Vulnerability Detail

The vulnerability arises from a flaw in the comparison of header values. By including trailing white space in the header values, an attacker can bypass authorization checks that rely on exact header value matches. This can allow them to access sensitive resources or perform actions that should be restricted. The impact of this vulnerability can be severe, as it undermines the integrity of access control mechanisms.

How To Fix

Minimum fixed version

10.19.0-r0

This is the first release that contains the fix.

sudo apk add --upgrade nodejs

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a workaround, it is advised to sanitize and trim HTTP header values before performing any comparisons. This can help mitigate the risk of unauthorized access due to trailing white space. Here is an example of how to sanitize header values in Node.js:

const sanitizedValue = req.headers['header-name'].trim();

Conclusion

The authorization bypass vulnerability in Node.js due to trailing white space in HTTP header values can have serious consequences, allowing unauthorized access to protected resources. It is crucial to update to the fixed versions of Node.js and sanitize header values to mitigate the risk. For further support and assistance in vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for nodejs →

Share this vulnerability

FAQ

The vulnerability allows attackers to bypass authorization checks based on header value comparisons, potentially leading to unauthorized access to protected resources.

Versions 10, 12, and 13 of Node.js are affected by this vulnerability.

To fix this vulnerability, update Node.js to the fixed versions: 10.19.0-r0 or 12.15.0-r0.

Yes, you can sanitize and trim HTTP header values before performing comparisons to mitigate the risk of unauthorized access.

Related vulnerabilities

Recent vulnerabilities recorded for nodejs.

How To Fix

Minimum fixed version

10.19.0-r0

This is the first release that contains the fix.

sudo apk add --upgrade nodejs

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback