MAL-2026-10103

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/optimize-regex/MAL-2026-10103.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-10103
Aliases
  • GHSA-vrj5-6f7q-fx9g
Published
2026-07-09T23:01:55Z
Modified
2026-08-20T16:30:12Z
Summary
Malicious code in optimize-regex (npm)
Details

-= Per source details. Do not edit below this line.=-

Source: amazon-inspector (9b77c2c0dab050d3a675407d74b649c73bfc107da05191cf041fb66e0346073a)

package.json declares optimize-regex as a dependency (and devDependency) of itself, resolved via a plain-HTTP tarball URL at http://pack.nppacks.com/npm/optimize-regex — a host unrelated to the package's publisher and outside the npm registry. On npm install, npm fetches and installs whatever bytes that URL currently serves as the same package name, giving the operator of pack.nppacks.com full control over the code that ends up in the installer's node_modules. The URL is unpinned (no hash, no version), served over cleartext HTTP (mutable in transit as well as at the host), and the visible index.js is a near-verbatim clone of babel-plugin-transform-define with a package name and description that do not match that functionality — a decoy while the actual payload is delivered through URL-scheme dependency resolution.

Source: ghsa-malware (865196ef50a0163709b774b9a34fd0b7677fd8397d23ba40be7e82ecf2990232)

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.

Database specific
{
    "malicious-packages-origins": [
        {
            "id": "IN-MAL-2026-009591",
            "import_time": "2026-07-09T23:30:55.796708279Z",
            "modified_time": "2026-07-09T23:01:55Z",
            "sha256": "9b77c2c0dab050d3a675407d74b649c73bfc107da05191cf041fb66e0346073a",
            "source": "amazon-inspector",
            "versions": [
                "1.2.1"
            ]
        },
        {
            "id": "GHSA-vrj5-6f7q-fx9g",
            "import_time": "2026-08-20T16:25:42.707967681Z",
            "modified_time": "2026-08-20T16:23:53Z",
            "ranges": [
                {
                    "events": [
                        {
                            "introduced": "0"
                        }
                    ],
                    "type": "SEMVER"
                }
            ],
            "sha256": "865196ef50a0163709b774b9a34fd0b7677fd8397d23ba40be7e82ecf2990232",
            "source": "ghsa-malware"
        }
    ]
}
References
Credits

Affected packages

npm / optimize-regex

Package

Name
optimize-regex
View open source insights on deps.dev
Purl
pkg:npm/optimize-regex

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected

Affected versions

1.*
1.2.1

Database specific

cwes
[
    {
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code"
    },
    {
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code"
    }
]
indicators
{
    "evidence_files": [
        {
            "path": "package.json",
            "sha256": "40f630bf111f7e97669e5fcdbb8a5edad0f2ab8bf94e33a8a69639833796234d",
            "tlsh": "e4f0c224ca62ea234cc825a67967010b63249a57586dfd1c73eb261c9e4c2bf31f825e"
        },
        {
            "path": "index.js",
            "sha256": "f2fcebdb4f0e41365a39ca87a52fcc4e6abd5633fe6272e60d1386d26b90ef41",
            "tlsh": "71a1935ab5e0159745aa22e5b3ce48b577bd80b3330df5a0b54cbf563f40c348a1aed1"
        }
    ],
    "package_integrity": [
        {
            "filename": "optimize-regex-1.2.1.tgz",
            "hashes": {
                "sha1": "d3294d4258aba12920ae0e9c6398968c37848a8d",
                "sha512_sri": "sha512-W9cXDw66Laddz5yv6FzWWwbt5p4Lfi8KxEeLBwtYJAFQOtnCGfkem1U/tQoEhXS+noVYPJY9D8+EhFJPBVlz/Q=="
            }
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/optimize-regex/MAL-2026-10103.json"