Prototype Pollution
Description
All versions of the nedb npm package are vulnerable to prototype pollution via __proto__ or constructor.prototype payloads, allowing property injection into Object.prototype.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
All versions of the nedb npm package are vulnerable to prototype pollution via __proto__ or constructor.prototype payloads, allowing property injection into Object.prototype.
Vulnerability
The nedb npm package (all versions) is vulnerable to prototype pollution. The library does not sanitize keys like __proto__ or constructor.prototype when processing data, allowing an attacker to inject properties into the base Object prototype [1][2]. This affects all versions of nedb.
Exploitation
An attacker can craft a payload containing __proto__ or constructor.prototype properties. When the nedb library processes this payload (e.g., during document insertion or update), it recursively merges the payload into internal objects without proper validation, polluting the global Object prototype [2]. No authentication or special privileges are required; the attacker only needs to supply malicious input to the library.
Impact
Successful exploitation leads to prototype pollution, which can cause denial of service (via JavaScript exceptions) or, in some cases, remote code execution if the application's code path is altered by the injected properties [2]. The pollution affects all JavaScript objects in the runtime, potentially leading to unexpected behavior across the application.
Mitigation
As of the publication date (2021-06-15), no fix has been released for nedb. The package appears to be unmaintained; users should consider migrating to an alternative database library that is actively maintained and not vulnerable to prototype pollution [1]. No workaround is available within nedb itself.
AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
nedbnpm | <= 1.8.0 | — |
Affected products
2- nedb/nedbdescription
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
3- github.com/advisories/GHSA-339j-hqgx-qrrxghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2021-23395ghsaADVISORY
- snyk.io/vuln/SNYK-JS-NEDB-1305279ghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.