MAL-2026-20354: Malicious code in apache-httpclient2 (npm)
Malicious package. Name-squats the Java Apache HttpClient on npm. The postinstall hook (src/postinstall.js) spawns src/main.js as a detached background process, which profiles the host (hostname, username, CPU and memory, GPU, screen resolution, locale, the running process list with a browser check, interactive-session check) using childprocess.execSync and sends the JSON over a raw TCP socket to 8.152.163.60:8058. In a sandboxed install the package connected to 8.152.163.60. Sibling packages apache-httpclient2, apache-httpclient6, apache-httpclient7 and apache-httpclient10 share the C2.
Affected Software
Event History
Frequently Asked Questions
What systems are exposed to this package's data collection?
Any host where the npm package is installed and its postinstall hook runs is exposed. The package profiles the host and sends the collected JSON to 8.152.163.60:8058 over a raw TCP connection.
What evidence can indicate that a host installed or executed the package?
Look for the package's postinstall behavior, including src/postinstall.js spawning src/main.js as a detached background process. Network connections to 8.152.163.60 on port 8058 are also a relevant indicator.
What information does the package collect?
It collects the hostname, username, CPU and memory details, GPU, screen resolution, locale, running process list, and checks related to browsers and interactive sessions. The information is sent as JSON to the remote server.
Are related npm package names also relevant to triage?
Yes. apache-httpclient6, apache-httpclient7, and apache-httpclient10 are identified as sibling packages sharing the same command-and-control server, so they should be included in package and dependency searches.