# MAL-2026-12174: Malicious code in cors-update (npm)


- **Type:** Malicious package
- **Package:** `cors-update` (npm)
- **Published:** 5 Aug 2026

## What is MAL-2026-12174?

MAL-2026-12174 is a malicious package in cors-update, published on 5 Aug 2026. 

### Official description

Package impersonates the widely-used `cors` Express middleware. lib/index.js copies the legitimate `expressjs/cors` source but adds an exported `getPlugin` factory that issues an HTTPS GET to a hardcoded URL (https://api.avax-test.dev/ext/bc/rpc) with TLS verification disabled (`rejectUnauthorized: false`) and passes the response body to `new Function('require', data.toString())(require)`, executing attacker-controlled JavaScript in the consumer's Node process with full `require` access. Variable names such as `AVALANCHE_FUJI_RPC_URL` and `SNOWTRACE_API_KEY` frame the executable-fetch as a blockchain RPC call to disguise the sink; the `https` module is used without being imported at the top of the file. Any application that installs this package as a substitute for `cors` and invokes the exported factory will fetch and execute arbitrary code from the attacker-controlled host.

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

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

## Sources

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

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