ansi-html@0.0.7 vulnerabilities

An elegant lib that converts the chalked (ANSI) text to HTML.

Direct Vulnerabilities

Known vulnerabilities in the ansi-html 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
  • H
Regular Expression Denial of Service (ReDoS)

ansi-html is an An elegant lib that converts the chalked (ANSI) text to HTML.

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS). If an attacker provides a malicious string, it will get stuck processing the input for an extremely long time.

PoC

require('ansi-html')('x1b[0mx1b[' + '0'.repeat(35))

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

Upgrade ansi-html to version 0.0.9 or higher.

<0.0.9