CVE-2021-3377: XSS

Published Jan 29, 2021
·
Updated

A flaw was found in npm package ansiup versions < 5.0.0 when parsing untrusted user input. An attacker could take advantage of this by introducing ANSI escape codes to inject arbitrary HTML and JavaScript in result mounting a cross-site scripting (XSS) attack.

Other sources

Node.js ansiup module is vulnerable to cross-site scripting, caused by improper validation of user-supplied input. A remote attacker could exploit this vulnerability using a specially-crafted URL to execute script in a victim's Web browser within the security context of the hosting Web site, once the URL is clicked. An attacker could use this vulnerability to steal the victim's cookie-based authentication credentials.

IBM

The npm package ansiup converts ANSI escape codes into HTML. In ansiup 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.

Affected Software

4 affected componentsFixes available
npm/ansi_up<5.0.0
5.0.0
IBM Cognos Analytics<=12.0.0-12.0.2
IBM Cognos Analytics<=11.2.0-11.2.4 FP3
Ansi Up Project Ansi Up Node.js<5.0.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/ansi_up to a version that resolves this vulnerability.

    Fixed in 5.0.0

Event History

Jan 29, 2021
CVE Published
12:00 AM
Data Sourced
12:00 AM
RemedyDescriptionSeverityWeaknessAffected Software
Mar 5, 2021
CVE Published
via MITRE·07:03 PM
Data Sourced
via MITRE·07:03 PM
Description
Data Sourced
via NVD·09:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Mar 8, 2021
Data Sourced
via Red Hat·01:28 PM
DescriptionSeverityAffected Software
Mar 11, 2021
Advisory Published
10:50 PM

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2021-3377?

CVE-2021-3377 is classified as a high severity vulnerability due to its potential for cross-site scripting (XSS) attacks.

2

How do I fix CVE-2021-3377?

To fix CVE-2021-3377, you should update the ansi_up package to version 5.0.0 or later.

3

What types of software are affected by CVE-2021-3377?

CVE-2021-3377 affects npm package ansi_up versions below 5.0.0, particularly in applications using affected versions like IBM Cognos Analytics.

4

Can CVE-2021-3377 lead to data breaches?

Yes, CVE-2021-3377 can potentially lead to data breaches by allowing attackers to inject malicious scripts into web applications.

5

Is there a workaround for CVE-2021-3377?

The most effective workaround for CVE-2021-3377 is to update the ansi_up package to a secure version, as no temporary fix is provided.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203