cvelo
P2 · HighMalware

Malicious code in @onyxim/math (npm)

  • MAL-2026-20953

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.

Text from the OSV record.

Affected

  • @onyxim/mathnpm

    • No versions listed

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.