tiny-naturalsort npm malware campaign: @onyxim/math 1.0.2 — malicious dependency installs systemd persistence via install script
Severity: critical · Patch status: no-fix-needed · Since 2026-12-02
OpenSSF identified @onyxim/math 1.0.2 (npm, published 2026-05-27 by user villelaaksonen) as a carrier for malicious code. The package is a republished copy of js-math whose only change from 1.0.1 swaps the dependency javascript-natural-sort for tiny-naturalsort (MAL-2026-5030), a malicious package. Installing @onyxim/math 1.0.2 pulls tiny-naturalsort, whose install script runs setup.cjs, which in the OpenSSF sandbox contacted 23.254.164[.]92:8000, launched a detached node payload connecting to 23.254.164[.]123:443, and installed a systemd user service (nvmconf.service running ~/.config/systemd/nvmconf/protocal.cjs) for persistence. The campaign matches the dayjs-typosquat campaign (easy-day-js MAL-2026-5979, caspian-day-js MAL-2026-5892). The package's own code is clean; npm has replaced it with a security placeholder. No patched versions exist.
What to do
- Search dependency trees and lockfiles for @onyxim/math 1.0.2 and tiny-naturalsort; remove and rebuild from clean sources if found
- Treat any build or CI machine that installed these packages as compromised: hunt for nvmconf.service and ~/.config/systemd/nvmconf/protocal.cjs, and for connections to 23.254.164[.]92:8000 and 23.254.164[.]123:443
- Rotate credentials, tokens and secrets accessible from affected developer or CI environments
- Block the listed C2 IPs at network egress and monitor for related dayjs-typosquat campaign packages (easy-day-js, caspian-day-js)
- Pin dependencies and enable npm audit / malware scanning in CI
Sources
All live incidents on Threat Watch