# MAL-2026-2509: Malicious code in @langgraphjs/toolkit (npm)


- **Type:** Malicious package
- **Package:** `@langgraphjs/toolkit` (npm)
- **Published:** 7 Apr 2026
- **Also known as:** GHSA-pq32-2vxj-cr62

## What is MAL-2026-2509?

MAL-2026-2509 is a malicious package in @langgraphjs/toolkit, published on 7 Apr 2026. 

### Official description

Package collects and sends sensitive system info to a hardcoded server. The package masquerades as a LangGraph JS utility but contains a malicious postinstall script.

The package's scripts/postinstall.js executes on npm install and collects installer-side identity and cloud/git metadata, then POSTs it as JSON to a hardcoded Google Cloud Run endpoint at npm-package-logger-228835561205.europe-west1.run.app. Collected data includes: git-configured emails from ~/.gitconfig,.git/config, and up to 15 reflog HEAD author emails; GitHub CLI login and email from hosts.yml; SSH public key comments from ~/.ssh/*.pub; GCP project and account identifiers from ~/.config/gcloud/properties; AWS profile names from ~/.aws/config; /etc/resolv.conf search domain; os.hostname(), os.userInfo().username, os.platform(), and cwd; plus parent project package.json details. The package name @langgraphjs/toolkit impersonates the legitimate @langchain/langgraph ecosystem (and the langgraphjs.guide domain referenced in the script), and declares @langchain/langgraph and @langchain/core as dependencies to appear legitimate. Its advertised main entry dist/index.js is not shipped in the tarball — only src/ and scripts/ — so the only code that actually runs on install is the harvester. Behavior is framed as anonymous telemetry/compatibility diagnostics, but the systematic enumeration of ~/.ssh, ~/.aws, ~/.config/gcloud, ~/.gitconfig, and git reflog is credential-adjacent identity theft, not telemetry.

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

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

## Sources

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

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