Prototype Pollution
Description
The package min-dash before 3.8.1 are vulnerable to Prototype Pollution via the set method due to missing enforcement of key types.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
The min-dash package before 3.8.1 is vulnerable to Prototype Pollution via the set method, allowing attackers to manipulate object prototypes.
Vulnerability
The min-dash JavaScript library before version 3.8.1 is vulnerable to Prototype Pollution through its set method [1]. The method fails to enforce key types, allowing an attacker to inject properties such as __proto__ into the object's prototype chain. This affects all versions prior to 3.8.1 [2].
Exploitation
An attacker can exploit this vulnerability by supplying a specially crafted object containing keys like __proto__, constructor, or prototype to the set method [3][4]. No authentication is required if the attacker can control input to the set method, which is typically possible in libraries that accept untrusted data. The attack simply involves passing such an object to the vulnerable function.
Impact
Successful exploitation leads to Prototype Pollution, where properties injected into Object.prototype are inherited by all JavaScript objects in the application [3][4]. This can result in denial of service through uncaught exceptions, or potentially remote code execution if the polluted properties affect security-sensitive code paths [2]. The impact depends on the application's usage of the library and the environment.
Mitigation
The vulnerability is fixed in min-dash version 3.8.1, released on January 21, 2022 [1]. Users should upgrade to this version or later. If upgrading is not possible, consider sanitizing inputs to the set method to reject prototype keys, though no official workaround is provided [2].
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 |
|---|---|---|
min-dashnpm | < 3.8.1 | 3.8.1 |
org.webjars.npm:min-dashMaven | < 3.8.1 | 3.8.1 |
Affected products
4- min-dash/min-dashdescription
- ghsa-coords2 versions
< 3.8.1+ 1 more
- (no CPE)range: < 3.8.1
- (no CPE)range: < 3.8.1
Patches
12c6689e2aa29fix(object#set): enforce key types
2 files changed · +29 −0
lib/object.js+8 −0 modified@@ -35,6 +35,14 @@ export function set(target, path, value) { forEach(path, function(key, idx) { + if (typeof key !== 'number' && typeof key !== 'string') { + throw new Error('illegal key type: ' + typeof key + '. Key should be of type number or string.'); + } + + if (key === 'constructor') { + throw new Error('illegal key: constructor'); + } + if (key === '__proto__') { throw new Error('illegal key: __proto__'); }
test/object.spec.js+21 −0 modified@@ -448,6 +448,27 @@ describe('object', function() { }).to.throw(/illegal key/); }); + + it('should not allow prototype polution via constructor', function() { + expect(function() { + set({}, ['constructor', 'prototype', 'polluted'], 'success'); + }).to.throw(/illegal key/); + }); + + + it('should not allow array as key', function() { + expect(function() { + set({}, [['__proto__'], 'polluted'], 'success'); + }).to.throw(/illegal key type/); + }); + + + it('should not allow object as key', function() { + expect(function() { + set({}, [{}, 'polluted'], 'success'); + }).to.throw(/illegal key type/); + }); + });
Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
10- github.com/advisories/GHSA-2m53-83f3-562jghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2021-23460ghsaADVISORY
- github.com/bpmn-io/min-dash/blob/c4d579c0eb2ed0739592111c3906b198921d3f52/lib/object.jsghsaWEB
- github.com/bpmn-io/min-dash/blob/c4d579c0eb2ed0739592111c3906b198921d3f52/lib/object.js%23L32mitrex_refsource_MISC
- github.com/bpmn-io/min-dash/commit/2c6689e2aa29f4b66a4874a2f3003431e9db48d1ghsaWEB
- github.com/bpmn-io/min-dash/pull/21ghsax_refsource_MISCWEB
- github.com/bpmn-io/min-dash/pull/21/commits/5ab05cbc4fd8d5eafb7db540c491ed0906b9d320mitrex_refsource_MISC
- github.com/bpmn-io/min-dash/security/advisories/GHSA-2m53-83f3-562jghsaWEB
- snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2342127ghsax_refsource_MISCWEB
- snyk.io/vuln/SNYK-JS-MINDASH-2340605ghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.