CVE-2022-21803
JavaScript vulnerability analysis and mitigation

Overview

CVE-2022-21803 affects the nconf package versions before 0.11.4. The vulnerability was discovered by Alessio Della Libera of Snyk Research Team and was disclosed on February 7, 2022. The package nconf is a hierarchical Node.js configuration system that handles files, environment variables, command-line arguments, and atomic object merging (MITRE CVE, Snyk Report).

Technical details

The vulnerability is a Prototype Pollution issue in the memory engine of nconf. When using the memory engine to store nested JSON configuration, the .set() function responsible for setting configuration properties is vulnerable to Prototype Pollution. The vulnerability allows an attacker to modify properties on the Object.prototype by providing crafted properties. The vulnerability has been assigned a CVSS base score of 7.3 (High) by Snyk, indicating significant security impact (Snyk Report).

Impact

The vulnerability can lead to several types of attacks: Denial of Service (DoS) through triggering JavaScript exceptions by polluting Object.prototype attributes, potential Remote Code Execution if the codebase evaluates and executes specific object attributes, and Property Injection where an attacker can manipulate security-critical properties like privileges or tokens (Snyk Report).

Mitigation and workarounds

The vulnerability has been fixed in nconf version 0.11.4. Users should upgrade to this version or higher to mitigate the risk. For those unable to upgrade immediately, recommended preventive measures include freezing the prototype using Object.freeze(Object.prototype), implementing schema validation for JSON input, avoiding unsafe recursive merge functions, and considering the use of objects without prototypes or using Map instead of Object (GitHub Release, Snyk Report).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-55182CRITICAL10
  • JavaScriptJavaScript
  • react
NoYesDec 03, 2025
CVE-2025-66401CRITICAL9.8
  • JavaScriptJavaScript
  • mcp-watch
NoNoDec 01, 2025
CVE-2025-66412HIGH8.5
  • JavaScriptJavaScript
  • @angular/compiler
NoYesDec 01, 2025
CVE-2025-66415MEDIUM6.9
  • JavaScriptJavaScript
  • @fastify/reply-from
NoYesDec 01, 2025
CVE-2025-66405MEDIUM6.9
  • JavaScriptJavaScript
  • @portkey-ai/gateway
NoYesDec 01, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management