CVE-2021-3377
ansi_up cross-site scripting vulnerability
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
NVD Score used
6.1
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.
- Record
CVE-2021-3377- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - CVSS 2.0
- 4.3 Medium
AV:N/AC:M/Au:N/C:N/I:P/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
CVE List No score
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.
- Record
CVE-2021-3377- Updated
- 2026-11-02
EUVDEUVD-2021-0589 No score
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.
- Record
EUVD-2021-0589- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-2v5f-23xc-v9qr
6.1
ansi_up cross-site scripting vulnerability
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.
- Record
GHSA-2v5f-23xc-v9qr- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSV
6.1
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.
- Record
CVE-2021-3377- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-02
OSVDEBIAN-CVE-2021-3377
6.1
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.
- Record
DEBIAN-CVE-2021-3377- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-02
OSVGHSA-2v5f-23xc-v9qr
6.1
ansi_up cross-site scripting vulnerability
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.
- Record
GHSA-2v5f-23xc-v9qr- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2021-3377
6.1
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.
- Record
UBUNTU-CVE-2021-3377- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
ansi_upnpm |
before 5.0.0 | 5.0.0 |
node-ansi-upDebian:12 |
before 5.0.0+dfsg-1 | 5.0.0+dfsg-1 |
node-ansi-upDebian:13 |
before 5.0.0+dfsg-1 | 5.0.0+dfsg-1 |
node-ansi-upDebian:14 |
before 5.0.0+dfsg-1 | 5.0.0+dfsg-1 |
node-ansi-upUbuntu:20.04:LTS |
All versions, plus listed versions 4.0.3+dfsg-2 |
None known |
node-ansi-upUbuntu:22.04:LTS |
All versions, plus listed versions 5.0.0+dfsg-15.1.0+dfsg-1 |
None known |
Public exploits
Links only. Every CVE stores no exploit code.
| Source | Link | Date |
|---|---|---|
| Nuclei | npm ansi_up v4 - Cross-Site Scripting |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, Nuclei, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-3377 is a medium vulnerability (CVSS 6.1) in Ansi Up Project Up, published March 5, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 8.00%, the 94th percentile. Fixed in ansi_up 5.0.0.
References
doyensec.com/resources/Doyensec_Advisory_ansi_up4_XSS.pdf
github.com/drudru/ansi_up/commit/c8c726ed1db979bae4f257b7fa41775155ba2e27
security.netapp.com/advisory/ntap-20241108-0002
nvd.nist.gov/vuln/detail/CVE-2021-3377
github.com/advisories/GHSA-2v5f-23xc-v9qr
security-tracker.debian.org/tracker/CVE-2021-3377
ubuntu.com/security/CVE-2021-3377
cve.org/CVERecord?id=CVE-2021-3377