Description
The npm package ansi_up converts ANSI escape codes into HTML. In ansi_up v4, ANSI escape codes can be used to create HTML hyperlinks. Due to insufficient URL sanitization, this feature is affected by a cross-site scripting (XSS) vulnerability. This issue is fixed in v5.0.0.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | node-ansi-up | 5.0.0+dfsg-1 | — |
| Debian 13 | node-ansi-up | 5.0.0+dfsg-1 | — |
| Debian 12 | node-ansi-up | 5.0.0+dfsg-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 22.04 LTS | node-ansi-up | No fix yet | — |
| Ubuntu 20.04 LTS | node-ansi-up | No fix yet | — |
Automated scanner template
A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.
- npm ansi_up v4 - Cross-Site Scripting http/cves/2021/CVE-2021-3377.yaml
Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| npm | ansi_up | < 5.0.0 | 5.0.0 | GHSA-2v5f-23xc-v9qr |