pug-code-gen@3.0.0-canary-2 vulnerabilities

Default code-generator for pug. It generates HTML via a JavaScript template function.

  • latest version

    3.0.3

  • latest non vulnerable version

  • first published

    9 years ago

  • latest version published

    1 years ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the pug-code-gen 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
    • H
    Improper Control of Generation of Code ('Code Injection')

    pug-code-gen is a Default code-generator for pug. It generates HTML via a JavaScript template function.

    Affected versions of this package are vulnerable to Improper Control of Generation of Code ('Code Injection') via the name option of the compileClient, compileFileClient, or compileClientWithDependenciesTracked functions. An attacker can execute arbitrary JavaScript code by providing untrusted input.

    Note:

    These functions are for compiling Pug templates into JavaScript, and there would typically be no reason to allow untrusted callers.

    How to fix Improper Control of Generation of Code ('Code Injection')?

    Upgrade pug-code-gen to version 3.0.3 or higher.

    <3.0.3