CVE-2022-21803: Prototype Pollution in nconf

nconf Updated 02 Oct 2025

Summary

13/04/2022
Yes i
High
7.3

CVE-2022-21803: Prototype Pollution in nconf. Affects nconf versions < 0.11.4. Fixed in 0.11.4. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

nconf is an npm package that provides an easy way to manage configuration settings for Node.js applications. It allows developers to store and retrieve configuration values from various sources, such as command-line arguments, environment variables, and configuration files. However, versions of nconf before 0.11.4 are vulnerable to Prototype Pollution.

Vulnerability Detail

The vulnerability in nconf arises when using the memory engine to store a nested JSON representation of the configuration. The .set() function, responsible for setting configuration properties, is susceptible to Prototype Pollution. An attacker can exploit this by providing a crafted property, allowing them to modify properties on the Object.prototype. This can lead to various security issues, such as remote code execution, information disclosure, or privilege escalation.

How To Fix

Minimum fixed version

0.11.4

This is the first release that contains the fix.

npm install nconf@0.11.4

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

Workaround

If updating the package is not immediately feasible, a temporary workaround is to avoid using the memory engine in nconf. Instead, consider using other storage engines, such as file or environment variables, which are not affected by this vulnerability.

Conclusion

The Prototype Pollution vulnerability in nconf can have severe security implications for Node.js applications. It is crucial to update the nconf package to version 0.11.4 or later to mitigate this vulnerability. If immediate updating is not possible, consider using alternative storage engines until the package can be updated. For additional support and guidance, contact DevNack.com.

See every vulnerability recorded for nconf →

Share this vulnerability

FAQ

nconf is an npm package that provides a convenient way to manage configuration settings for Node.js applications.

Prototype Pollution is a vulnerability that occurs when an attacker can inject properties into an object's prototype, leading to unintended behavior or security issues.

The consequences of this vulnerability can vary depending on the specific application. However, possible outcomes include remote code execution, information disclosure, or privilege escalation.

You can use Vulert's playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Simply upload your package-lock.json file, and Vulert will provide real-time alerts for open-source vulnerabilities.

For further support on vulnerability remediation, you can reach out to info@devnack.com. They can provide guidance and assistance in addressing this vulnerability.

How To Fix

Minimum fixed version

0.11.4

This is the first release that contains the fix.

npm install nconf@0.11.4

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