MAL-2026-6022 Malicious code in @mastra/express (npm)
- Package
- @mastra/express
- Registry
- npm
What is MAL-2026-6022?
MAL-2026-6022 is a malicious package in @mastra/express, published on 17 Jun 2026.
Official description
The package's bundled distribution files (dist/index.cjs and dist/index.js) contain a Buffer.from(..., 'base64').toString('utf-8') decode pattern. This pattern by itself is benign and extremely common in JavaScript bundles — used for inline data URIs, JWT segment parsing, encoded SVG/PNG assets, configuration constants, and similar legitimate purposes. No corroborating evidence of credential theft, exfiltration, dropper behavior, lifecycle-script abuse, or hardcoded attacker infrastructure was observed. The match is on a single keyword pattern in a bundled main module with no traced harmful execution path.
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.
What should I do about MAL-2026-6022?
Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.
Sources
Also known as GHSA-r6w3-xpw9-p9g6.