xapi-lib (npm) · Malicious Code
Affects xapi-libSource GCVE Database
Malicious package : remove xapi-lib and rotate any secrets on hosts that installed it.
Data as of 3 Nov 2026, 23:50 UTC
Malicious package
Published to npm · OSV MAL-2026-17896
What to do
Remove xapi-lib 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 |
|---|---|---|
| npmxapi-lib | 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 npm package xapi-lib versions 88.2.3, 88.2.5, 90.2.1, and 90.3.1 contains malicious code that executes a preinstall script during npm install. This script sends an HTTP request with a hardcoded authorization header to an external domain unrelated to the package's stated functionality, potentially exposing the installer's IP and environment. The package itself provides no legitimate library functionality and is considered fully malicious.
References
- npmjs.com/package/xapi-lib (opens in a new tab)
- npmjs.com/package/xapi-lib/v/88.2.5 (opens in a new tab)
- npmjs.com/package/xapi-lib/v/88.2.3 (opens in a new tab)
- npmjs.com/package/xapi-lib/v/90.3.1 (opens in a new tab)
- npmjs.com/package/xapi-lib/v/90.2.1 (opens in a new tab)
- github.com/advisories/GHSA-wm6w-9vgq-gw26 (opens in a new tab)