# MAL-2026-6656: Malicious code in authmatrix (npm)


- **Type:** Malicious package
- **Package:** `authmatrix` (npm)
- **Published:** 29 Jun 2026
- **Also known as:** GHSA-qr38-fjw7-r54v

## What is MAL-2026-6656?

MAL-2026-6656 is a malicious package in authmatrix, published on 29 Jun 2026. 

### Official description

The package is published as 'authmatrix' with a description suggesting basic auth functionality, but its lib/ tree is a copy of the pino logger and its entry point auth.js requires lib/writer.js. At module top level, writer.js attempts require('ssr-auth-sync') and, on failure, shells out via execSync to run `npm install ssr-auth-sync` and then requires the just-installed module from a relative path. ssr-auth-sync is not declared in the package's dependencies, so any consumer that imports authmatrix triggers an unattended install and immediate execution of code from a third-party package name the installer never opted into. writer.js additionally hides its failure-path string by assembling it via String.fromCharCode concatenation rather than a literal, a low-grade evasion that co-occurs with the dropper path. The misleading auth-themed identity over a copy of pino, combined with the require-time fetch+execute of an undeclared external package, is a supply-chain dropper pattern.

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-6656?

Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.

## Fix prompt for AI coding agents

```text
MAL-2026-6656 is a malicious package: authmatrix (npm). Every version was published to cause harm.

Task:
1. Search this repository's dependency manifests and lockfiles for the package, including transitive dependencies.
2. If it is present, remove it, regenerate the lockfile with the project's package manager, and replace whatever it was used for.
3. List any CI runners, developer machines or containers that installed it, so their secrets can be rotated.
4. If the package is not used anywhere, say so and change nothing.

Reference: https://insights.sbomify.com/MAL-2026-6656/ (Markdown: https://insights.sbomify.com/MAL-2026-6656/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/MAL-2026-6656

---
From sbomify Insights: https://insights.sbomify.com/MAL-2026-6656/
Summaries are generated and may contain mistakes; the official description above is the record.
