# @mastra npm scope takeover: 143 packages backdoored via compromised contributor account

DevFeed: [@mastra npm scope takeover: 143 packages backdoored via compromised contributor account](<https://devfeed.tech/articles/mastra-npm-scope-takeover-143-packages-backdoored-via-compromised-contributor-account-13149.md>)

Original publisher: [Read original article](<https://www.chainguard.dev/unchained/mastra-npm-scope-takeover-143-packages-backdoored-via-compromised-contributor-account>)

Published: 2026-06-17T00:00:00Z

Content type: news

Language: en

Sources: [Chainguard: Unchained](<https://devfeed.tech/sources/chainguard-unchained.md>)

Topics: [software supply-chain attack](<https://devfeed.tech/topics/software-supply-chain-attack.md>), [mastra](<https://devfeed.tech/topics/mastra.md>), [npm security](<https://devfeed.tech/topics/npm-security.md>), [malicious packages](<https://devfeed.tech/topics/malicious-packages.md>), [account takeover](<https://devfeed.tech/topics/account-takeover.md>), [npm packages](<https://devfeed.tech/topics/npm-packages.md>), [npm](<https://devfeed.tech/topics/npm.md>), [Remote Access Trojan](<https://devfeed.tech/topics/remote-access-trojan.md>), [infection chain](<https://devfeed.tech/topics/infection-chain.md>), [C2](<https://devfeed.tech/topics/c2.md>), [slsa levels](<https://devfeed.tech/topics/slsa-levels.md>), [chainguard](<https://devfeed.tech/topics/chainguard.md>)

Tags: [2026](<https://devfeed.tech/tags/2026.md>), [account](<https://devfeed.tech/tags/account.md>), [all](<https://devfeed.tech/tags/all.md>), [analysis](<https://devfeed.tech/tags/analysis.md>), [attack](<https://devfeed.tech/tags/attack.md>), [audit](<https://devfeed.tech/tags/audit.md>), [c2](<https://devfeed.tech/tags/c2.md>), [chainguard](<https://devfeed.tech/tags/chainguard.md>), [chainguard-customers](<https://devfeed.tech/tags/chainguard-customers.md>), [chainguard-libraries](<https://devfeed.tech/tags/chainguard-libraries.md>), [chainguard-packages](<https://devfeed.tech/tags/chainguard-packages.md>), [command](<https://devfeed.tech/tags/command.md>), [command-and-control](<https://devfeed.tech/tags/command-and-control.md>), [contributor](<https://devfeed.tech/tags/contributor.md>), [control](<https://devfeed.tech/tags/control.md>), [credentials](<https://devfeed.tech/tags/credentials.md>), [customers](<https://devfeed.tech/tags/customers.md>), [malware](<https://devfeed.tech/tags/malware.md>), [mastra](<https://devfeed.tech/tags/mastra.md>), [npm](<https://devfeed.tech/tags/npm.md>), [npm-takeover](<https://devfeed.tech/tags/npm-takeover.md>), [packages](<https://devfeed.tech/tags/packages.md>), [scope](<https://devfeed.tech/tags/scope.md>), [secure-packages](<https://devfeed.tech/tags/secure-packages.md>), [software-packages](<https://devfeed.tech/tags/software-packages.md>)

## AI overview

On June 17, 2026, an attacker using a compromised former contributor's npm account republished all 143 packages in the @mastra scope with a malicious dependency. The stated exposure window was 01:15-02:00 UTC; fresh installs during that period could receive versions designed to disable TLS verification, download and run a cryptocurrency wallet stealer and remote access trojan, then self-delete. The excerpt says the attacker's command-and-control server was active at analysis time. It advises auditing dependency trees and lockfiles for @mastra packages and, if found, treating the host as compromised and rotating credentials. Malicious versions lacked SLSA provenance attestations, unlike legitimate releases described in the excerpt; signature-verifying installs or attestation policies would have rejected them. Chainguard customers are reported as unaffected.

## Source excerpt

A supply chain attack compromised all 143 @mastra packages. Chainguard customers stayed protected through malware blocking and source-built libraries.