MAL-2026-17309

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/stestenv/MAL-2026-17309.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-17309
Published
2026-09-30T01:27:20Z
Modified
2026-09-30T01:45:11Z
Summary
Malicious code in stestenv (npm)
Details

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

Source: amazon-inspector (ee35b23a60484ee1d468154734cc7cdbc8c7d3cbc81901ab680cb67e46a8c2b6)

On require of the package's main entry, dispatchAnalytics() reads a payload hidden in the JPEG APP13 (marker 0xFFED) segment of the bundled dist/stest.jpg, decrypts it with a hardcoded AES-256-CBC key to obtain a UTF-16LE PowerShell command, writes a VBScript to the OS tmpdir, and launches it via wscript.exe to run powershell.exe -NoProfile -NonInteractive -EncodedCommand <payload>. Runtime binary names are string-split ("power"+"shell", "wscript"+".exe") and the process is spawned detached with windowsHide:true and .unref() to evade lexical scanners and hide the window. A companion dist/decode.js confirms the encrypted PowerShell payload format (hardcoded 32-byte key, AES-256-CBC, UTF-16LE, re-base64 for -EncodedCommand). The bundled cli embeds an inlined package.json with a different identity (name:"node-env-buffer", version:"2.2.6") than the published stestenv name, indicating the same dropper is being redistributed under multiple names while presenting a dotenv-style cover story. Installing or importing this package on Windows results in silent execution of attacker-controlled code hidden inside a shipped image asset.

Database specific
{
    "malicious-packages-origins":  [
        {
            "id":  "IN-MAL-2026-020785",
            "import_time":  "2026-09-30T01:36:51.389353258Z",
            "modified_time":  "2026-09-30T01:27:20Z",
            "sha256":  "ee35b23a60484ee1d468154734cc7cdbc8c7d3cbc81901ab680cb67e46a8c2b6",
            "source":  "amazon-inspector",
            "versions":  [
                "1.0.1"
            ]
        }
    ]
}
References
Credits

Affected packages

npm / stestenv

Package

Affected ranges

Affected versions

1.*
1.0.1

Database specific

cwes
[
    {
        "cweId":  "CWE-506",
        "description":  "The product contains code that appears to be malicious in nature.",
        "name":  "Embedded Malicious Code"
    }
]
indicators
{
    "evidence_files":  [
        {
            "path":  "dist/index.cjs",
            "sha256":  "97fa0d7666e80c68a3cd4f3326dc31bd9203619d6bbae7449efe62de15c4e815",
            "tlsh":  "4262f784b3dcb03617eb62e190ab4407e9f5da95408c1418f294e4bb35e46db42fbf79"
        },
        {
            "path":  "dist/decode.js",
            "sha256":  "6070845282c4fc7e5b6b8f7c1bbd270d01e5ef8fafaeff77b2a0eb6c398d6733",
            "tlsh":  "c39195c23da2a14a0fb257f28ab3802de335fa037001d3d5b9ac81441f76569925bdfd"
        },
        {
            "path":  "dist/cli.cjs",
            "sha256":  "8556eeca50285aea12dfdcbc4ebcee110d916ef81ddde2e338dcf78bda2028cf",
            "tlsh":  "d792d74473cdb47a17e621d070ab500beaf2cb60459c1504f2dcb07627f4a9a96ebfb9"
        }
    ],
    "package_integrity":  [
        {
            "filename":  "stestenv-1.0.1.tgz",
            "hashes":  {
                "sha1":  "828bc0d28f55ba1d08cc52998547c90aeca1beb8",
                "sha512_sri":  "sha512-PV6ZD4PTAkfBoOL+JJaaLbM9DqxdUE7sFXZB74q6hnwYFSw3XM7XjHWImCPIcv8pSfkOlS2WGQRZFWlvnE5d0g=="
            }
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/stestenv/MAL-2026-17309.json"