Malicious code in @onyxim/math (npm)
- GHSA-m7g7-9hrw-rmgf
Description
@onyxim/math 1.0.2 (npm user villelaaksonen, published 2026-05-27) is a republished copy of the js-math library. Its only change from 1.0.1, published 37 minutes earlier, replaces the dependency javascript-natural-sort with tiny-naturalsort, a malicious package (MAL-2026-5030). Installing @onyxim/math 1.0.2 therefore installs tiny-naturalsort, whose install step runs setup.cjs. In the OpenSSF sandbox this contacted 23.254.164[.]92:8000, started a detached node payload pointed at 23.254.164[.]123:443, and installed a systemd user service (nvmconf.service, ~/.config/systemd/nvmconf/protocal.cjs) for persistence. This matches the dayjs-typosquat campaign (easy-day-js MAL-2026-5979, caspian-day-js MAL-2026-5892). The package works as a carrier that hides the malicious dependency behind a plausible maths library. The package's own code is clean: it is a carrier for the malicious dependency, which npm has since replaced with a security placeholder. --- Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/442f1d734442e75a16b69778e28e70aceb2dc9ee/osv/malicious/npm/@onyxim/math/MAL-2026-20953.json))
Text from the GitHub Advisory record.
Affected
@onyxim/mathnpm
- No versions listed
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.