npm package report

Is ansi-regex safe?

Version 6.2.1 of ansi-regex was compromised; other versions are not flagged as malicious. CyberXYZ Proxy blocks the affected versions. It also has 1 known vulnerability, the worst rated HIGH.

Do not install ansi-regex 6.2.1

CRITICAL

Compromised releases. Added to CyberXYZ 2025-09-08, OSV malicious-package feed (Google / OpenSSF).

// what we observed

The package was compromised and malicious code added. Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.

Reported by GitHub Advisory Database via OSV.

// versions and what to do
Malicious
6.2.1
Move to
6.6.0 newest 6.x release, no known advisory

If one of these versions was installed, remove it and treat the credentials, tokens and SSH keys on that machine as exposed: rotate them. Check CI runners and container images that installed it too.

npm install ansi-regex@6.6.0

OSV recordreferenceadvisoryadvisory

// reach

0 direct dependencies

none carry a known advisory

    46 packages depend on it

    an advisory here reaches each of them

    Create a free accountfor every dependency path, dependent and what to upgrade
    // ai model usage

    Tracked for PyPI packages. HuggingFace models declare Python dependencies, so npm packages are not covered.


    cvss
    7.5
    high

    CVSS v3.1 base score out of 10

    epss
    3.6%
    medium

    chance of exploitation in 30 days, 89th percentile of all CVEs

    xyz score
    4.7
    medium

    CyberXYZ composite out of 10

    fig. 01 — GHSA-93q8-gq69-wqmw, the advisory selected below

    // 1 advisories

    ansi-regex is vulnerable to Inefficient Regular Expression Complexity which could lead to a denial of service when parsing invalid ANSI escape codes.

    Full advisory text at GitHub advisory or NVD.

    // cvss v3.1 vector

    CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

    Attack vector
    Network
    Attack complexity
    Low
    Privileges required
    None
    User interaction
    None
    Scope
    Unchanged
    Confidentiality
    None
    Integrity
    None
    Availability
    High
    // questions
    Is ansi-regex safe to install?

    Version 6.2.1 of ansi-regex was compromised. Other versions are not flagged as malicious.

    Does ansi-regex have known vulnerabilities?

    Yes. CyberXYZ records 1 known vulnerability for ansi-regex (npm), the worst rated HIGH. They are GHSA-93q8-gq69-wqmw.

    Which version of ansi-regex should I use?

    Use 6.6.0 or a later release that is not named as malicious. Versions named on this report as malicious must not be installed.

    How do I check ansi-regex before installing?

    Search ansi-regex in CyberXYZ Check at https://cyberxyz.io/check?q=ansi-regex. The xyz Scanner checks a project's dependencies, and CyberXYZ Proxy checks each package as it is installed.


    Checked 2026-11-14 at 12:04 UTC. The most recent advisory here was published 2021-09-20. Updated continuously from NVD, GHSA, OSV and CNA feeds.

    Think a verdict here is wrong? Tell us — we respond within 2 business days.