markdown-it-texmath@0.6.5 vulnerabilities

markdown-it extension for rendering TeX Math

  • latest version

    1.0.0

  • latest non vulnerable version

  • first published

    7 years ago

  • latest version published

    2 years ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the markdown-it-texmath 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
    • M
    Cross-site Scripting (XSS)

    markdown-it-texmath is a that add TeX math equations to your Markdown documents rendered by markdown-it parser.

    Affected versions of this package are vulnerable to Cross-site Scripting (XSS). Within texmath.js, it is possible to bypass the current validation and inject JavaScript within math renderer.

    PoC

    $$"<img/src=./ onerror=alert(location)>
    e^{i\theta} = i\sin\thetae^{i\theta}
    $$
    

    How to fix Cross-site Scripting (XSS)?

    Upgrade markdown-it-texmath to version 0.9.0 or higher.

    <0.9.0