CVE-2021-23438
CRITICAL 9.8CVSS 3.1Type confusion in mpath
This affects the package mpath before 0.8.4. A type confusion vulnerability can lead to a bypass of CVE-2018-16490. In particular, the condition ignoreProperties.indexOf(parts[i]) !== -1 returns -1 if parts[i] is ['proto']. This is because the method that has been called if the input is an array is Array.prototype.indexOf() and not String.prototype.indexOf(). They behave differently depending on the type of the input.
- Published
- 1 Sep 2021
- Last modified
- 17 Jun 2026
- Assigned by
- report@snyk.io
- NVD status
- Modified
- Weakness
- CWE-843
- Also known as
- GHSA-p92x-r36w-9395
- Sources
- NVDJSONOSV GHSA-p92x-r36w-9395JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | report@snyk.io (Secondary) | CVSS 3.1 | MEDIUM 5.6 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.6 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | HIGH 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | mpath_project | mpathcpe:2.3:a:mpath_project:mpath:*:*:*:*:*:node.js:*:* |
< 0.8.4 | 0.8.4 |
| OSV | npm | mpath | < 0.8.4 | 0.8.4 |
References
- https://github.com/aheckmann/mpath/commit/89402d2880d4ea3518480a8c9847c541f2d824fc · Patch, Third Party Advisory, WEB
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1579548 · Exploit, Third Party Advisory, WEB
- https://snyk.io/vuln/SNYK-JS-MPATH-1577289 · Exploit, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-23438 · ADVISORY
- https://github.com/mongoosejs/mpath/commit/89402d2880d4ea3518480a8c9847c541f2d824fc · WEB
- https://github.com/aheckmann/mpath · PACKAGE
History
- 25 Nov 2026 20:33 UTC · NVD: first stored (published 1 Sep 2021)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 2 Sep 2021)