Bypass of Network Import Restrictions in Node.js

nodejs Updated 02 Oct 2025

Summary

09/07/2024
N/A
Yes i
Unrated
Not published

CVE-2024-22020: A security flaw in Node.js allows a bypass of network import restrictions. Affects nodejs versions < 20.15.1-r0. Fixed in 20.15.1-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 network applications. The vulnerability discussed here affects the Node.js package in the Alpine Linux distribution, specifically versions 3.19 and 3.20. Node.js allows importing modules from external sources, but this vulnerability allows an attacker to bypass network import restrictions by embedding non-network imports in data URLs.

Vulnerability Detail

The vulnerability (CVE-2024-22020) in Node.js allows an attacker to execute arbitrary code by embedding non-network imports in data URLs. This can compromise system security and violate network import security measures. The vulnerability has been verified on various platforms and is mitigated by forbidding data URLs in network imports. Developers and servers using affected versions of Node.js are at risk of having their network import security compromised.

How To Fix

Minimum fixed version

20.15.1-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

There is no specific workaround mentioned for this vulnerability.

Conclusion

The vulnerability in Node.js allows a bypass of network import restrictions by embedding non-network imports in data URLs. This can lead to the execution of arbitrary code and compromise system security. It is recommended to update the Node.js package to version 20.15.1-r0 or later to mitigate this vulnerability.

See every vulnerability recorded for nodejs →

Share this vulnerability

FAQ

Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. It allows developers to build scalable network applications.

The vulnerability allows an attacker to execute arbitrary code, compromising system security and violating network import security measures.

The vulnerability affects Node.js versions 0 to 20.15.1-r0 in the Alpine Linux distribution, specifically versions 3.19 and 3.20.

To mitigate this vulnerability, update the Node.js package to version 20.15.1-r0 or later, which forbids data URLs in network imports.

No specific workaround has been mentioned for this vulnerability.

Related vulnerabilities

Recent vulnerabilities recorded for nodejs.

How To Fix

Minimum fixed version

20.15.1-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