Malicious Code Hides in Anthropic Skills Test Files

๐กAnthropic Skills vuln evades scanners via test files, steals creds in tests
โก 30-Second TL;DR
What Changed
Scanners only check markdown instructions, ignoring .test.ts files
Why It Matters
Developers face stealthy supply-chain attacks when installing shared Skills, risking credential theft in CI/CD pipelines and team repos. This highlights a blind spot in current scanning threat models, amplifying risks from unvetted marketplaces.
What To Do Next
Scan your Skills directories for *.test.ts files and disable auto-test runs in IDEs and CI.
Key Points
- โขScanners only check markdown instructions, ignoring .test.ts files
- โขTest runners execute malicious beforeAll hooks silently during npm test or IDE auto-run
- โขSkills install copies entire dirs into repos, propagating to teams via git
- โข26.1% of 31k Skills vulnerable per SkillScan study; Snyk audit confirms risks
๐ง Deep Insight
AI-generated analysis for this event.
๐ Enhanced Key Takeaways
- โขThe vulnerability stems from the 'Anthropic Skills' architecture allowing arbitrary code execution in the host environment because test runners like Jest operate with the same user-level permissions as the developer's IDE or CI/CD pipeline.
- โขGecko Security's research indicates that the attack vector is exacerbated by the 'copy-paste' nature of Skill integration, which bypasses traditional dependency management systems like npm or yarn that would otherwise flag malicious packages.
- โขAnthropic has initiated a mandatory security review for all third-party Skills and is reportedly developing a sandboxed execution environment for test files to isolate them from the host filesystem.
๐ ๏ธ Technical Deep Dive
- โขVulnerability Mechanism: The exploit leverages the 'beforeAll' hook in Jest/Vitest, which executes before any test cases run, allowing the malicious code to perform filesystem traversal or network requests before the developer realizes a test is running.
- โขAttack Surface: The issue is specific to the 'Anthropic Skills' directory structure, where the platform treats .test.ts files as trusted local assets rather than untrusted external inputs.
- โขExfiltration Path: Malicious scripts utilize standard Node.js 'fs' and 'http' modules to exfiltrate environment variables (e.g., ANTHROPIC_API_KEY, AWS_SECRET_ACCESS_KEY) to remote command-and-control (C2) servers.
๐ฎ Future ImplicationsAI analysis grounded in cited sources
โณ Timeline
Weekly AI Recap
Read this week's curated digest of top AI events โ
๐Related Updates
AI-curated news aggregator. All content rights belong to original publishers.
Original source: VentureBeat โ