CVE-2022-21190 Prototype Pollution
Prototype pollution in convict allows attackers to modify object prototypes, potentially leading to code execution or privilege escalation.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-21190?
CVE-2022-21190 is a high-severity vulnerability in convict, published on 13 May 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
This affects the package convict before 6.2.3. This is a bypass of [CVE-2022-22143](https://security.snyk.io/vuln/SNYK-JS-CONVICT-2340604). The [fix](https://github.com/mozilla/node-convict/commit/3b86be087d8f14681a9c889d45da7fe3ad9cd880) introduced, relies on the startsWith method and does not prevent the vulnerability: before splitting the path, it checks if it starts with __proto__ or this.constructor.prototype. To bypass this check it's possible to prepend the dangerous paths with any string value followed by a dot, like for example foo.__proto__ or foo.this.constructor.prototype.
Weakness: CWE-1321
Which versions are affected by CVE-2022-21190?
2 open source packages ship an affected version, including convict. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
convict npm | All versions | 6.2.3 |
convict npm | All versions | 6.2.3 |
Products include Mozilla Convict.
How do I fix CVE-2022-21190?
Upgrade convict to 6.2.3 or later.
Is CVE-2022-21190 being exploited?
There is no known exploitation of CVE-2022-21190 in the wild and no public exploit code.
Other vulnerabilities in convict
Sources
Also known as GHSA-jjf5-wx3j-3fv7, SNYK-JS-CONVICT-2774757.