Advisory

MAL-2026-17222

Also known as: GHSA-mh9w-qr45-6wrq

Malicious package Its source marks this package as malicious: it is not a vulnerability in a legitimate one.

Summary

Malicious code in vite-plugin-crypto (npm)

Details

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

Source: amazon-inspector (54ee82c069dcdf259199f5844c6ff46be3020d79609ff7b7b8ebc82017c59b2c)
[email protected] exposes a Vite plugin factory whose body concatenates three option fields — secret, salt, and iv — into a single string and passes it to System.import(...) from the systemjs runtime module loader, discarding the returned promise with .then(() => {}). Only secret is used by the advertised AES-GCM encrypt() path; salt and iv are declared on the options type but are absent from the documented options table and are unused by the real crypto code (which generates its own random salt/IV per call). The concatenated string is treated as a module specifier by SystemJS, which resolves URLs and executes fetched JavaScript, so whoever controls these option values obtains arbitrary JavaScript execution on the Vite build/dev host each time the config is loaded. Pulling in a browser-oriented dynamic module loader as the package's only runtime dependency, naming the concatenated input derivedSecret, and swallowing the promise frame the remote-loader call as a benign key-derivation step. Base64 decoding in dist/index.cjs and dist/index.js is used within the AES-GCM helper. The trigger fires at plugin construction during vite build / vite dev.

Source: ghsa-malware (fdaf333e613f70df12ceaf378093d996a4bc1dd4df1a6350c4848a5de0fb83e7)
Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.

Severity

Not rated by the source.

Dates

Published
2026-09-28 16:03 UTC
Modified
2026-09-30 01:00 UTC

Affected packages and fixes

vite-plugin-crypto

npm · All systems

Affected

  • introduced 0 (semver)

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: OpenSSF Malicious Packages · Apache-2.0

Sources & licences