S4E just found a high-severity finding from top 10 tcp port service scan
PlatformPlansPartners
Resources
ToolsBlogDocs
Sign Up →
medium·Product Based Web Vulnerabilities·Updated Jan 3, 2024

CVE-2021-3377 Scanner

CVE-2021-3377 scanner - Cross-Site Scripting (XSS) vulnerability in npm package ansi_up

Est. Time~10 seconds
Scan TypeSingle Scan
Targetsdomain, ipv4, subdomain
CostFree
2.9k
Times Used
continuous scan runs
4.8k
Continuously Checked
assets under CS
0
Vulnerabilities Found
confirmed findings
References
CVECVE-2021-3377
6.1
CVSS

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 Vector
-
Privileges Req.
-
User Interaction
-
Affected
n/aby n/a
n/a
Updated Aug 21, 2026View on NVD →
Detail

The npm package ansi_up is a converter that transforms ANSI escape codes into HTML. This package is commonly used for formatting and enhancing terminal output in web applications. It offers various features such as colorizing text, bold and italic fonts, and even the ability to create HTML hyperlinks through ANSI escape codes. 

CVE-2021-3377 is a cross-site scripting (XSS) vulnerability found in ansi_up version 4. Due to insufficient URL sanitization, a malicious user can inject script code into a hyperlink, which can later be executed in the victim's browser. This vulnerability can be exploited by an attacker to gain access to sensitive data, such as login credentials, and even take control of victim's sessions.

Exploiting this vulnerability can lead to various security issues, from stealing sensitive information to taking over an entire system. For example, if an attacker injected a malicious code into a hyperlink using ansi_up, and a user clicked on that hyperlink, the script code could be executed on the user's system, allowing the attacker to gain access to their login credentials and other sensitive information.

In conclusion, vulnerabilities such as CVE-2021-3377 can have severe consequences for digital assets. Luckily, there are tools available to help prevent such issues. s4e.io offers pro features that allow users to quickly and easily scan their digital assets for vulnerabilities. By using this platform, businesses and individuals can ensure their systems and data stay safe and secure.

 

REFERENCES

Solution Advice

To protect against this vulnerability, users of ansi_up package can take the following precautions:

  • Update to the latest version of the ansi_up package (v5.0.0), where the vulnerability is fixed.
  • Sanitize URLs before passing them to ansi_up to avoid injecting script code.
  • Use Content Security Policy (CSP) to restrict the types of resources a web page can load, thus preventing scripts from executing in case of a successful XSS attack.
  • Implement input validation to prevent users from submitting malicious URLs or other input.

Get AI-powered remediation steps tailored to your asset.

Try AI Solutions →

Check your infrastructure.
Right now.

11,000+ scanners. Free to start. No credit card required.

CVE-2021-3377 scanner - Cross-Site Scripting (XSS) vulnerability in npm package ansi_up | S4E