Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
Windows Tipps & SecurityGrafikkarte vor Überhitzung schützen: So geht’s(25.09.2026 um 08:00 Uhr)
••••••••••
Windows Tipps & SecurityGrafikkarte vor Überhitzung schützen: So geht’s(25.09.2026 um 08:00 Uhr)
••••••••••
Intelligence View
⚡ tsecurity.de Intelligence

The npm Worm That Learned to Trust Your AI Agent

Your editor's autopilot is now part of your attack surface Here's the part that should stop you mid-scroll: this isn't just another npm worm harvesting .env files. It's a worm that plants hooks in Claude Code and VS Code, waiting for the…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!




Your editor's autopilot is now part of your attack surface



Here's the part that should stop you mid-scroll: this isn't just another npm worm harvesting .env files. It's a worm that plants hooks in Claude Code and VS Code, waiting for the moment you trust a workspace, so it can execute without you doing anything else stupid. That's a new kind of trigger, and it deserves more than zero comments.






We've seen this movie before, mostly



Credential-stealing npm worms are not new. Preinstall/postinstall script abuse has been the go-to vector for years, event-stream, ua-parser-js, the colors/faker sabotage, take your pick. Keyv itself is a small, widely-depended-on caching library, exactly the kind of low-glamour package that makes a perfect worm vector because nobody's watching it closely. Popular enough to spread, boring enough to ignore. That part of the story is depressingly familiar.



What's different is the payload's choice of home. Instead of just exfiltrating secrets and calling it a day, whoever built this planted SessionStart and folderOpen hooks tied to AI coding agents and editor tooling. That's not lateral movement through infrastructure. That's lateral movement through developer habit. You open a folder, your agent starts a session, and the trust boundary you thought you had (workspace trust prompts, sandboxing assumptions) gets used against you as the actual detonator.






The hype and the quiet part nobody's saying loudly enough



The "AI coding agents are now a supply chain attack surface" framing will get milked hard in the next few weeks, and honestly, it's earned this time. But let's be precise about what's overstated and what's underappreciated.



Overstated: that this is some sophisticated AI-specific exploit. It's not. Claude Code and VS Code hooks are just automation surfaces, config-driven task runners that happen to fire on predictable lifecycle events. The attacker didn't break AI security, they found a lifecycle hook with a broad enough trigger condition (opening a folder, starting a session) and abused it exactly like npm scripts have been abused for a decade. Same playbook, new floor.



Understated: how much of the industry has quietly decided that "trusting a workspace" is a one-time, low-friction decision. Workspace trust prompts exist because editors learned, painfully, that arbitrary code execution on folder-open is dangerous. Adding agent tooling with its own hook system on top of that trust model just recreates the same problem at a new layer, and most people clicking "trust this workspace" have no mental model of what that trust now actually grants.



Who benefits from the loud version of this story? Frankly, everyone selling "AI security" tooling right now has a strong incentive to make this sound like a novel AI threat rather than a supply-chain problem that happened to touch AI tooling. The real lesson is boring: transitive dependencies plus automatic script execution plus broad trust grants equals bad outcomes, whether the trigger is npm install or an agent's SessionStart hook.






What this actually means for people shipping code



If you're pulling keyv or anything downstream of it, you're auditing dependency trees today, not next sprint. But the bigger structural takeaway is that agent and editor hook systems need the same scrutiny CI pipelines got after the last five years of npm worms. Nobody threat-modeled "what happens when a hostile package plants a hook that fires when Claude Code starts a session." That's an obvious gap in retrospect, the kind that's always obvious in retrospect.



For security teams, this is a good moment to actually go look at what hooks your AI coding tools support, and what triggers them. Not hypothetically. Open the docs. Most teams have zero visibility into this because it's new enough that it hasn't made it into anyone's asset inventory or policy yet.



For the ecosystem, preinstall/postinstall script restrictions have been debated forever and mostly ignored because they're inconvenient. Every time one of these worms hits, someone proposes disabling lifecycle scripts by default. Every time, it doesn't stick because too much tooling depends on it. I don't expect that calculus to change this time either, even with AI agents now in the blast radius.






The question worth sitting with



If workspace trust and dependency trust are both single, coarse-grained decisions, and agent tooling keeps adding new automatic triggers on top of that trust, at what point does "trusting a workspace" stop meaning anything specific at all?



— Cor, Skyblue Soft






Sources



1. Sofort-Triage & Abwehrmaßnahmen

SOC Incident Playbook: Remote Code Execution (RCE) Defense
Syntax validiert (0 Fehler)
title: Detect Exploitation - The npm Worm That Learned to Trust Your AI Agent
id: 9d09f08f-a437-465b-8079-4716f32c01d6
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-27
logsource:
  category: network_connection
  product: any
detection:
  selection:
      CommandLine|contains:
        - 'exploit'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
Syntax validiert (0 Fehler)
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-27"
        description = "YARA Signature for "
    strings:
        $str = "The npm Worm That Learned to T" ascii wide
    condition:
        any of them
}
Syntax validiert (0 Fehler)
index=security sourcetype IN ("cisco:asa", "pan:traffic", "zeek_conn", "suricata", "WinEventLog:Security")
("The npm Worm That Learned to Trust Your ")
| stats count earliest(_time) as first_seen latest(_time) as last_seen by src_ip, dest_ip, dest_host, signature
| eval first_seen=strftime(first_seen, "%Y-%m-%d %H:%M:%S"), last_seen=strftime(last_seen, "%Y-%m-%d %H:%M:%S")
| sort - count
Syntax validiert (0 Fehler)
message: "*The npm Worm That Learned to Trust Your *"
Syntax validiert (0 Fehler)
CommonSecurityLog
| where Message has "The npm Worm That Learned to Trust Your "
| summarize EventCount = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by SourceIP, DestinationIP, DestinationPort, Activity
| extend DetectionRule = "iShareStuff-CTI-Compiled"
| sort by EventCount desc

2. Cyber Threat Intelligence & Forensik

🎯
MITRE ATT&CK Matrix Navigator 14 Taktiken
Reconnaissance
-
Resource Development
-
Initial Access
Execution
Persistence
-
Privilege Escalation
Defense Evasion
Credential Access
-
Discovery
-
Lateral Movement
-
Collection
-
Command and Control
Exfiltration
-
Impact
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Analyse für identifizierte Bedrohung auf Basis von Live-CTI (ENISA EUVD): CVSS 0.0 · EPSS 0.0% · CISA KEV: nein. Handlungsableitung aus den verlinkten Hersteller-Quellen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

⚡ Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-100739 | A vulnerability was detected in mathurvishal CloudClassroom-PHP-Project…
Advisory →
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag