Prototype Pollution Vulnerability in Node.js Package on Alpine Linux

nodejs Updated 02 Oct 2025

Summary

24/02/2022
N/A
Yes i
High
8.2

ALPINE-CVE-2022-21824: Due to the formatting logic of the "console.table()" function it was not safe to allow user controlled input to be passed to the "properties" parameter while simultaneously passing a plain object with at least one proper... Affects nodejs versions < 12.22.10-r0. Fixed in 12.22.10-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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Node.js is a popular open-source runtime environment that allows developers to execute JavaScript code server-side. It is widely used for building scalable network applications. The affected package, 'nodejs', is integral to many applications running on Alpine Linux, a security-oriented, lightweight Linux distribution. This vulnerability arises from the 'console.table()' function, which improperly handles user-controlled input, leading to potential prototype pollution.

Vulnerability Detail

The vulnerability, identified as CVE-2022-21824, stems from the 'console.table()' function's formatting logic. It allows user-controlled input to be passed to the 'properties' parameter while also passing a plain object with at least one property, such as 'proto'. This can lead to prototype pollution, where an empty string can be assigned to numerical keys of the object prototype. Although the control is limited, it poses a risk as it can affect the integrity of the application. The vulnerability affects Node.js versions >= 12.22.9, >= 14.18.3, >= 16.13.2, and >= 17.3.1.

How To Fix

Minimum fixed version

12.22.10-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 temporary workaround, avoid passing user-controlled input directly to the 'properties' parameter of the 'console.table()' function. Instead, sanitize and validate the input before using it.

Conclusion

In summary, CVE-2022-21824 is a significant prototype pollution vulnerability in the Node.js package on Alpine Linux. It is crucial for developers to update their Node.js installations to the patched versions to mitigate potential risks. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for nodejs →

Share this vulnerability

FAQ

Prototype pollution is a type of vulnerability that allows an attacker to manipulate an object's prototype, potentially leading to unexpected behavior in applications.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

Exploiting this vulnerability can lead to denial of service, data corruption, or other unintended behaviors in applications relying on the affected Node.js versions.

Yes, the CVSS score for this vulnerability is 8.2, indicating a high severity level.

The affected versions of Node.js are >= 12.22.9, >= 14.18.3, >= 16.13.2, and >= 17.3.1.

Related vulnerabilities

Recent vulnerabilities recorded for nodejs.

How To Fix

Minimum fixed version

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