# CVE-2021-23438: Prototype Pollution

- Severity: Medium 5.6 (CVSS:3.1, scored by snyk) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P/RL:O/RC:C`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.72%, higher than 78% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2021-09-01T18:20:11.072Z
- Modified: 2026-06-17T03:38:45.830Z
- Also known as: GHSA-p92x-r36w-9395
- Weaknesses: CWE-843
- Assigned by: snyk

## Description

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.

(As written by CVE List.)

## Affected

- mpath: from unspecified before 0.8.4
- mpath (npm): before 0.8.4
- mpath_project mpath: before 0.8.4

## Every score

- snyk: CVSS:3.1 5.6 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P/RL:O/RC:C`
- GitHub: CVSS:3.1 5.6 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`

## References

- <https://snyk.io/vuln/SNYK-JS-MPATH-1577289> (exploit, third-party-advisory, web)
- <https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1579548> (exploit, third-party-advisory, web)
- <https://github.com/aheckmann/mpath/commit/89402d2880d4ea3518480a8c9847c541f2d824fc> (patch, 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)

## Sources

- CVE List: [CVE-2021-23438](https://www.cve.org/CVERecord?id=CVE-2021-23438), CVE Terms of Use, modified 2024-09-16
- GitHub Advisory Database: [GHSA-p92x-r36w-9395](https://github.com/advisories/GHSA-p92x-r36w-9395), CC-BY-4.0, modified 2025-01-14
- NVD: [CVE-2021-23438](https://nvd.nist.gov/vuln/detail/CVE-2021-23438), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-23438 · Whole record: https://cve.day/CVE-2021-23438.json · Rebuilt by cve.day 2026-11-25T22:58:03.618Z
