TC-2026-0021 · NPM · PACKAGE

@mastra/[email protected]

Unauthorized npm publication in @mastra/core 0.1.22 exfiltrating environment variables and agent memory configuration during Mastra agent initialization.

Signed ledger verdict

TC-2026-0021
Known bad (exit 2) npm:@mastra/[email protected]

IOC & scope: npm:@mastra/[email protected]. Verified by human review and signed into the CC-BY 4.0 OSV v1.6.0 feed.

Credited finder
Socket Security ↗
Recorded timestamp
2026-02-09
Canonical SHA-256
5388fd3d2e651bc4…
Local hook action
Block (exit 2)
01 8-Vector Capability X-Ray (ABOM) & OWASP Agentic Crosswalk

Deterministic capability profile and taxonomy mapping.

Every artifact in the threat.cafe ledger is profiled across eight execution vectors and mapped to the OWASP Top 10 for Agentic Applications (ASI01-ASI10) and Agentic Skills & Tools (AST01-AST10).

8-Vector Capability X-Ray (ABOM)

  1. 1. Filesystem
    Sensitive paths touched: None observed
  2. 2. Environment
    Variables harvested: OPENAI_API_KEY, ANTHROPIC_API_KEY, DATABASE_URL
  3. 3. Network
    Outbound egress domains: mastra-telemetry-edge.invalid:443
  4. 4. Subprocess
    Process execution primitives: None observed
  5. 5. Lifecycle
    Install / startup hooks: None observed
  6. 6. OAuth / MCP
    Declared scopes: None observed
  7. 7. Obfuscation
    Encoding / steganography: None observed
  8. 8. Provenance
    Attestation status: compromised_publish_token

Governance & detector mapping

  1. OWASP Agentic ASI (2026): ASI03 (Identity & Privilege Abuse), ASI04 (Agentic Supply Chain Vulnerabilities), ASI06 (Memory & Context Poisoning)
  2. OWASP Agentic AST (2026): AST01 (Malicious MCP Servers), AST03 (Insecure Credential Handling)
  3. Deterministic rules matched: RULE_05_PROMPT_EXFIL_SHELL, RULE_06_RELEASE_AGE_GATE

Version scoping & related records

  • No other versions of this package are currently listed on the board. Unlisted versions evaluate to unknown under local policy.yml.

Local CLI verification

$ threat-cafe-hook check "npm:@mastra/[email protected]"
[threat.cafe] known_bad: npm:@mastra/[email protected] (TC-2026-0021)
  Reason: Unauthorized npm publication in @mastra/core 0.1.22 exfiltrating environment variables and
  Source: https://socket.dev/blog (credited to Socket Security)

OSV v1.6.0 machine-readable record

Included in /feed.json under CC-BY 4.0 license and verified by /feed.json.sig.

{
  "schema_version": "1.6.0",
  "id": "TC-2026-0021",
  "modified": "2026-02-09T11:30:00Z",
  "published": "2026-02-09T11:30:00Z",
  "summary": "Unauthorized npm publication in @mastra/core 0.1.22 exfiltrating environment variables and agent memory configuration during Mastra agent initialization.",
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "@mastra/core"
      },
      "versions": [
        "0.1.22"
      ]
    }
  ],
  "credits": [
    {
      "name": "Socket Security",
      "type": "FINDER"
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://socket.dev/blog"
    },
    {
      "type": "WEB",
      "url": "https://threat.cafe/incidents/tc-2026-0021/"
    }
  ],
  "database_specific": {
    "target": "npm:@mastra/[email protected]",
    "kind": "package",
    "verdict": "known_bad",
    "ioc": "npm:@mastra/[email protected]",
    "artifact_sha256": "5388fd3d2e651bc4b81c3389ba5f9a60ffae2823cbecb1ca42c87a13fd23fe8a",
    "owasp_asi": [
      "ASI03",
      "ASI04",
      "ASI06"
    ],
    "owasp_ast": [
      "AST01",
      "AST03"
    ],
    "rules_matched": [
      "RULE_05_PROMPT_EXFIL_SHELL",
      "RULE_06_RELEASE_AGE_GATE"
    ],
    "abom": {
      "fs_sensitive": [],
      "env_harvest": [
        "OPENAI_API_KEY",
        "ANTHROPIC_API_KEY",
        "DATABASE_URL"
      ],
      "net_egress": [
        "mastra-telemetry-edge.invalid:443"
      ],
      "proc_exec": [],
      "install_hooks": [],
      "oauth_scopes": [],
      "obfuscation": [],
      "provenance": "compromised_publish_token"
    },
    "license": "CC-BY-4.0",
    "record_digest": "sha256:8a83058fc19d5ce5fc14542a16abae81eee7ff0eaed6f76ae9a55a8a4f872146",
    "release_signature_url": "https://threat.cafe/feed.json.sig"
  }
}

Have additional IOCs or a maintainer remediation update for TC-2026-0021?

Maintainer disputes and version-scoping updates are reviewed by a human within our 48-hour dispute SLA.