MAL-2026-20554: Malicious code in native-stream-parser (npm)

Published Nov 25, 2026
·
Updated

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

Source: amazon-inspector (d4fb217d81e79be4844f58b4467338645a739063a28f3b80009d5aad00cc3b58) On any require('native-stream-parser'), index.js platform-dispatches to one of three bundled N-API addons (native.napi.node, nativemac.node, nativewin.node). Each addon reads the shipped ~1.3MB opaque high-entropy.napicache file, decrypts it, writes it to a hidden temp path (/tmp/.<pid> on Unix, %TEMP%\<name>.nc<pid>.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 GITHUBACTIONS, GITLABCI, CIRCLECI, JENKINSURL, BUILDKITE, CODEBUILDBUILDID, TRAVIS, SANDBOX, APPVEYOR, SEMAPHORE, and TEAMCITYVERSION 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.

Affected Software

1 affected component
npm/native-stream-parser=1.0.1

Event History

Nov 25, 2026
Advisory Published
via OSV·06:06 AM
Data Sourced
via OSV·06:06 AM
DescriptionAffected Software

Frequently Asked Questions

1

What action triggers the payload?

Simply importing the package with require('native-stream-parser') triggers platform dispatch to a bundled N-API addon. The addon decrypts the shipped cache file, writes a JavaScript payload to a hidden temporary path, and starts it as a detached child process.

2

Which systems are exposed?

The package includes separate bundled addons for Unix-like systems, macOS, and Windows. Unix payloads are written under /tmp using a hidden PID-based name, while Windows payloads are written under %TEMP% with a name ending in .nc<pid>.js.

3

Can CI or analysis environments be treated as safe?

No. The addons check multiple CI-related environment variables and probe for debugging or analysis indicators, including tracer and process information on Linux and debugger/process checks on Windows. These checks indicate environment-aware behavior, but the data does not state that execution is reliably prevented in those environments.

4

What evidence can indicate that the package executed?

Look for hidden PID-based files in /tmp on Unix or files named with an .nc<pid>.js suffix in %TEMP% on Windows. Process telemetry may also show a detached child process launched by the package, including node executing the temporary JavaScript file on Windows.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203