VDB
EN

MAL-2026-6710

Malicious code in vitest-agent (npm)

상세

--- _-= Per source details. Do not edit below this line.=-_

## Source: amazon-inspector (6e0165cbb3d6ed37a96889c4b016463706346e1c09413635c31ea1ceedde8774) The package's postinstall script (`node lib/utils/index.js`) spawns a detached, stdio-suppressed Node child process that runs `lib/utils/smtp-connection/index.js`. That file fetches JavaScript from `https://jsonkeeper.com/b/WDH3V` via axios and executes the response with `new Function("require", r.data.cookie)(require)`, running unpinned, mutable, non-publisher code on the installer's machine at `npm install` time. The package is named `vitest-agent` but its `main` and shipped source are a verbatim copy of nodemailer (author field `Andris Reinman`, description is an unrelated React copyright string), a name/identity mismatch consistent with a lure targeting vitest ecosystem users. Concealment signals reinforce the dropper: a ~256 KB `LICENSE` file sits adjacent to a 185-byte dropper `index.js` under `lib/utils/smtp-connection/`, and path names mirror legitimate nodemailer layout as cover. Because the harmful code path fires automatically from the postinstall lifecycle hook, installers are compromised without any explicit user action beyond installing the package.

이 버전이 영향받나요?

사용 중인 패키지 버전을 입력하면 즉시 평가합니다.

영향 패키지

npm / vitest-agent

No fixed version published yet for vitest-agent (npm). Pin to a known-safe version or switch to an alternative.

참고