Malicious code in @mastra/koa (npm)
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (c0e8ae2c317dbb57c6a85b0bea50cddd76d109cd8ec802bc646df6c514d91bcd) The bundled output at dist/index.cjs:212 and dist/index.js:210 contains a Buffer.from(..., 'base64').toString('utf-8') pattern. Base64 decoding into a UTF-8 string is a routine primitive used by many libraries (decoding JWT segments, parsing data URIs, handling HTTP basic-auth headers, decoding SDK tokens, etc.) and on its own is not evidence of malicious behavior. No environmental scraping, attacker-controlled network destinations, lifecycle hooks, or eval/exec of decoded content was observed. Routing to human review so a reviewer can confirm the decoded value is used as data rather than passed to an interpreter. ## Source: ghsa-malware (8dd39253d95966dbc6f4cdf9ad6f910e67502b6df405fa824848e6e95d2b4b7f) 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.
AI Analysis
Technical Summary
The @mastra/koa npm package version 1.5.14 is identified as containing malicious code. Analysis detected base64 decoding patterns typical in many libraries but found no direct signs of malicious execution or network activity in the inspected code. Despite this, the package is classified as a fully compromising malicious package by the GHSA-malware source, indicating that any system with this package installed should be considered compromised. Secrets and keys on affected systems should be rotated immediately from a separate, trusted environment. Complete remediation may require more than just removing the package due to potential persistent compromise.
Potential Impact
Any computer with @mastra/koa version 1.5.14 installed or running is considered fully compromised. This includes potential unauthorized access to all secrets and keys stored on the system. The presence of this package may allow attackers full control over the affected system. Simply uninstalling the package does not guarantee removal of all malicious software introduced by it.
Mitigation Recommendations
Remove the @mastra/koa package version 1.5.14 immediately from affected systems. Rotate all secrets and keys stored on the compromised computer using a different, trusted machine. Due to the high risk of full system compromise, consider performing a full system audit and clean reinstall if necessary. Patch status is not confirmed; check vendor advisories for updates or official fixes.
Malicious code in @mastra/koa (npm)
Description
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (c0e8ae2c317dbb57c6a85b0bea50cddd76d109cd8ec802bc646df6c514d91bcd) The bundled output at dist/index.cjs:212 and dist/index.js:210 contains a Buffer.from(..., 'base64').toString('utf-8') pattern. Base64 decoding into a UTF-8 string is a routine primitive used by many libraries (decoding JWT segments, parsing data URIs, handling HTTP basic-auth headers, decoding SDK tokens, etc.) and on its own is not evidence of malicious behavior. No environmental scraping, attacker-controlled network destinations, lifecycle hooks, or eval/exec of decoded content was observed. Routing to human review so a reviewer can confirm the decoded value is used as data rather than passed to an interpreter. ## Source: ghsa-malware (8dd39253d95966dbc6f4cdf9ad6f910e67502b6df405fa824848e6e95d2b4b7f) 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.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The @mastra/koa npm package version 1.5.14 is identified as containing malicious code. Analysis detected base64 decoding patterns typical in many libraries but found no direct signs of malicious execution or network activity in the inspected code. Despite this, the package is classified as a fully compromising malicious package by the GHSA-malware source, indicating that any system with this package installed should be considered compromised. Secrets and keys on affected systems should be rotated immediately from a separate, trusted environment. Complete remediation may require more than just removing the package due to potential persistent compromise.
Potential Impact
Any computer with @mastra/koa version 1.5.14 installed or running is considered fully compromised. This includes potential unauthorized access to all secrets and keys stored on the system. The presence of this package may allow attackers full control over the affected system. Simply uninstalling the package does not guarantee removal of all malicious software introduced by it.
Mitigation Recommendations
Remove the @mastra/koa package version 1.5.14 immediately from affected systems. Rotate all secrets and keys stored on the compromised computer using a different, trusted machine. Due to the high risk of full system compromise, consider performing a full system audit and clean reinstall if necessary. Patch status is not confirmed; check vendor advisories for updates or official fixes.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-6025
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-w9wg-f3pj-cf4v"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a50ba5c68715ace4357f002
Added to database: 07/10/2026, 09:24:44 UTC
Last enriched: 07/10/2026, 09:45:54 UTC
Last updated: 07/29/2026, 03:53:53 UTC
Views: 29
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.