markdown-it-texmath@0.8.0 vulnerabilities

markdown-it extension for rendering TeX Math

Direct Vulnerabilities

Known vulnerabilities in the markdown-it-texmath package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable 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