{"id":"MAL-2026-20554","summary":"Malicious code in native-stream-parser (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (d4fb217d81e79be4844f58b4467338645a739063a28f3b80009d5aad00cc3b58)\nOn any require('native-stream-parser'), index.js platform-dispatches to one of three bundled N-API addons (native.napi.node, native_mac.node, native_win.node). Each addon reads the shipped ~1.3MB opaque high-entropy.napi_cache file, decrypts it, writes it to a hidden temp path (/tmp/.\u003cpid\u003e on Unix, %TEMP%\\\u003cname\u003e.nc\u003cpid\u003e.js on Windows), and launches it as a detached child process (fork+setsid+execlp on Unix; CreateProcessA with 'node \"%s\"' on Windows). The payload bytes are opaque and not derivable from any declared source, so the author controls arbitrary code executing on the installer's host at import time. Prior to execution, the addons probe for analysis environments: Linux reads /proc/1/cgroup, /proc/self/status (TracerPid), and /proc/self/maps; Windows calls IsDebuggerPresent, CheckRemoteDebuggerPresent, and enumerates processes via Toolhelp32 looking for wireshark/httpdebug; both check CI env vars including GITHUB_ACTIONS, GITLAB_CI, CIRCLECI, JENKINS_URL, BUILDKITE, CODEBUILD_BUILD_ID, TRAVIS, SANDBOX, APPVEYOR, SEMAPHORE, and TEAMCITY_VERSION to gate execution. The JS 'parse' export is a one-line buf.toString() cover function unrelated to the native work; the package ships no README, no repository, no files/scripts manifest entries, and uses a generic name under a disposable-looking author. The combination of an encrypted bundled payload executed at import, debugger/CI/container evasion co-located with the decrypt-and-exec primitive, and a thin cover API matches a hostile dropper rather than the advertised stream-parsing utility.\n","modified":"2026-11-25T06:30:09.153103801Z","published":"2026-11-25T06:06:17Z","database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-023100","import_time":"2026-11-25T06:20:24.614976597Z","modified_time":"2026-11-25T06:06:17Z","sha256":"d4fb217d81e79be4844f58b4467338645a739063a28f3b80009d5aad00cc3b58","source":"amazon-inspector","versions":["1.0.1"]}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/native-stream-parser/v/1.0.1"}],"affected":[{"package":{"name":"native-stream-parser","ecosystem":"npm","purl":"pkg:npm/native-stream-parser"},"versions":["1.0.1"],"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":"native-stream-parser-1.0.1.tgz","hashes":{"sha1":"220a19287707210bd9cd9a9dc62a2aef13393330","sha512_sri":"sha512-o4Blk62ru4peAf/Lx60lp8vhZlbPesXWPbWbsO/NtA/KgRaqKBRfGADff61i8sfjQOqy8/7iqTs/GrywyPWyAw=="}}],"evidence_files":[{"path":"index.js","sha256":"a75979509efeb5d8af23cb41638605dc016a082ab8809854d525a09ef3a2c762","tlsh":"58d0ebcc3bf0a09a234557e460ea8b80b0c3c880804c6a1a4ac579712f84c009f61cfb"},{"tlsh":"e072964bd2a0dd3ec4d86231598b527152a2d070ef30172f0f54a2fb2d97359ae7ae52","path":"native.napi.node","sha256":"ccc606da8da32838c649148f9cad16a5f45ea967ea8aad8f580ad8d75d6a83a5"},{"sha256":"904487dc9968a49f37f35922e5448bd62c6227ce845fe3cb914d346215c7a335","tlsh":"1ed0a7758b10d42305c857250d7643c773515e1b4102bc243767e01cd7ad66b52fb12e","path":"package.json"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/native-stream-parser/MAL-2026-20554.json"}}],"schema_version":"1.9.2","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}