MAL-2026-15565

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@testrelic/playwright-analytics/MAL-2026-15565.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-15565
Published
2026-08-29T03:00:52Z
Modified
2026-08-29T03:30:10.362818188Z
Summary
Malicious code in @testrelic/playwright-analytics (npm)
Details

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

Source: amazon-inspector (c305bbe247587c98b06f039cdcf78066dbcd4fdacf5a5de0411023c2a4fcc97a)

scripts/postinstall.cjs is registered as the package's postinstall lifecycle script and runs automatically on npm install. After a block of legitimate-looking config-scaffolding code, the file contains roughly 7 KB of whitespace padding followed by an obfuscated payload that reconstructs a large string via a custom Fisher–Yates shuffle, resolves the String constructor property (Function) to avoid any literal Function/eval token, and invokes Function('', decodedBody)(decodedArg). Immediately before the invocation the script assigns require, module, __dirname, and __filename onto the global object so the decoded body can load arbitrary Node built-ins. The whitespace gap conceals the payload from casual review of the file, and the indirection through String[constructor] avoids the literal tokens static reviewers grep for. The bundled dist/index.cjs, dist/reporter-entry.cjs, and dist/cli.cjs additionally contain require('child_process') alongside outbound HTTP POST call sites and ping invocations. The package's declared identity (a Playwright analytics reporter under an unfamiliar @testrelic scope) is inconsistent with shipping an obfuscated postinstall dynamic-code loader.

Database specific
{
    "malicious-packages-origins": [
        {
            "id": "IN-MAL-2026-019149",
            "modified_time": "2026-08-29T03:00:52Z",
            "import_time": "2026-08-29T03:19:44.702034358Z",
            "source": "amazon-inspector",
            "sha256": "c305bbe247587c98b06f039cdcf78066dbcd4fdacf5a5de0411023c2a4fcc97a",
            "versions": [
                "2.13.0"
            ]
        }
    ]
}
References
Credits

Affected packages

npm / @testrelic/playwright-analytics

Package

Name
@testrelic/playwright-analytics
View open source insights on deps.dev
Purl
pkg:npm/%40testrelic/playwright-analytics

Affected ranges

Affected versions

2.*
2.13.0

Database specific

cwes
[
    {
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code",
        "cweId": "CWE-506"
    }
]
indicators
{
    "package_integrity": [
        {
            "filename": "playwright-analytics-2.13.0.tgz",
            "hashes": {
                "sha512_sri": "sha512-sdKejYN3QLQHkj0HILr+UU9uFT60clNsKk33e0B85ODjySausezaa2ypIJ6Mo26j45y+02J/zIJei50jxMo1nQ==",
                "sha1": "dc5200d7950f32305ec324c48170a9764e4534d7"
            }
        }
    ],
    "evidence_files": [
        {
            "path": "scripts/postinstall.cjs",
            "tlsh": "84127e555a8f573946e2e6c6d52e0363f673e2b6369ca3a0b0edf0c85b91010197368f",
            "sha256": "19795496ad752f37b76a2dd5d6c6a2914ab6fa62bda0bda7bfe5cd4afd9f029f"
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@testrelic/playwright-analytics/MAL-2026-15565.json"