apache-httpclient2 (npm) · Malicious Code
Affects apache-httpclient2Source GCVE Database
Malicious package : remove apache-httpclient2 and rotate any secrets on hosts that installed it.
Data as of 25 Nov 2026, 18:25 UTC
Malicious package
Published to npm · OSV MAL-2026-20354
What to do
Remove apache-httpclient2 from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
npmapache-httpclient2pkg:npm/apache-httpclient2Other threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
The apache-httpclient2 package on npm is a malicious package that impersonates the legitimate Java Apache HttpClient. Its postinstall script runs a background process that collects detailed host information, including system and user data, and sends this data to a remote command and control server. Related packages share the same command and control infrastructure. Any system with this package installed should be considered fully compromised.