Skip to navigation

Threat reportSupply ChainTL-2026-3766

Shai-Hulud detection tool shipped functional malware as AI-generated test files

mediumRESOLVED

G DATA reports that an open-source detector for the Shai-Hulud npm worm shipped test files that were functional malware, including PowerShell scripts that delete user directories and code that uploads data to real threat actors. G DATA assumes no malicious intent: the files were likely AI-generated (vibe-coded) and are not executed in normal use. First disclosed .

By

Key facts

IdentifiersTL-2026-3766
SeverityMEDIUM
First disclosed
Affected productsUnnamed open-source maintainer Shai-Hulud npm worm detection tool (not named in the G DATA article)
Weaknesses (CWE)CWE-506
MalwareShai-Hulud
ToolsShai-Hulud detection tool (open-source, name not given by G DATA)
MITRE ATT&CK techniquesT1005 Data from Local System, T1059.001 PowerShell, T1195.001 Compromise Software Dependencies and Development Tools, T1204.002 Malicious File, T1485 Data Destruction, T1552.001 Credentials In Files, T1567 Exfiltration Over Web Service
MotivationUNKNOWN
Target sectorstechnology, software-development, security-vendors
Target regionsGlobal
Detection rules9 (1 shown free)
Sources7 cited sources

Detection coverage

As of 2026-10-16, Threadlinqs Intelligence publishes 9 detection rule(s) for TL-2026-3766 across Splunk SPL, Microsoft KQL and Sigma, covering 8 indicator(s) of compromise. The whole corpus is readable without an account. Every threat comes with one complete detection in Splunk SPL, Microsoft KQL and Sigma, free for everyone; a free account adds daily TL Creds to unlock the rest. Paid plans add a larger daily allowance, correlation and the MCP server. Threadlinqs MCP server · View plans.

Free detection: Shai-Hulud Detector Test File Executed via Script Interpreter (T1204.002)

Detects PowerShell, WScript, CScript or Node launched from a Shai-Hulud detector repository test-cases directory. G DATA (2026-02-16) found that the test files of an open-source Shai-Hulud npm worm detector were functional malware (user-directory deletion, data upload, .npmrc/env credential theft). Execution of those files by a user browsing the repo is the trigger for data loss or exposure.

Splunk SPL

index=sysmon sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1 earliest=-24h
(Image="*\\powershell.exe" OR Image="*\\pwsh.exe" OR Image="*\\wscript.exe" OR Image="*\\cscript.exe" OR Image="*\\node.exe")
(CommandLine="*test-cases*" OR CurrentDirectory="*test-cases*" OR ParentCommandLine="*test-cases*")
(CommandLine="*shai-hulud*" OR CommandLine="*shai_hulud*" OR CurrentDirectory="*shai-hulud*" OR CurrentDirectory="*shai_hulud*" OR ParentCommandLine="*shai-hulud*")
| stats count min(_time) as first_seen max(_time) as last_seen values(CommandLine) as command_lines values(ParentImage) as parents by host User Image CurrentDirectory
| convert ctime(first_seen) ctime(last_seen)

Microsoft KQL

let interpreters = dynamic(["powershell.exe","pwsh.exe","wscript.exe","cscript.exe","node.exe"]);
DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName in~ (interpreters)
| where ProcessCommandLine contains "test-cases" or InitiatingProcessCommandLine contains "test-cases"
| where ProcessCommandLine has_any ("shai-hulud","shai_hulud") or InitiatingProcessCommandLine has_any ("shai-hulud","shai_hulud") or FolderPath has_any ("shai-hulud","shai_hulud")
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine, FolderPath

Sigma

title: Shai-Hulud Detector Test File Executed via Script Interpreter
id: 3f1c9a52-6b0e-4d7a-9c41-8e2a5b7d1f01
status: experimental
description: Detects script interpreters executing files from a Shai-Hulud detector test-cases directory, where test files were found to be functional malware.
references:
    - https://blog.gdatasoftware.com/2026/02/38370-malware-in-test-files
    - https://www.cisa.gov/news-events/alerts/2025/09/23/widespread-supply-chain-compromise-impacting-npm-ecosystem
author: Threadlinqs Team
date: 2026-10-16
tags:
    - attack.initial-access
    - attack.t1195.001
    - attack.execution
    - attack.t1204.002
    - attack.t1059.001
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        Image|endswith:
            - '\powershell.exe'
            - '\pwsh.exe'
            - '\wscript.exe'
            - '\cscript.exe'
            - '\node.exe'
    path_cmd:
        CommandLine|contains: 'test-cases'
    path_cwd:
        CurrentDirectory|contains: 'test-cases'
    path_parent:
        ParentCommandLine|contains: 'test-cases'
    name_cmd:
        CommandLine|contains:
            - 'shai-hulud'
            - 'shai_hulud'
    name_cwd:
        CurrentDirectory|contains:
            - 'shai-hulud'
            - 'shai_hulud'
    name_parent:
        ParentCommandLine|contains:
            - 'shai-hulud'
            - 'shai_hulud'
    condition: selection_img and 1 of path_* and 1 of name_*
falsepositives:
    - Security researchers deliberately running detector test fixtures in an isolated lab
    - Developers running the detector's own unit-test harness from the repository
level: high

Known false positives:

  • Analysts intentionally detonating the detector's test corpus in a sandbox VM
  • CI/test runners executing the detector's own test suite (node test-cases harness)

Tuning notes: Exclude known analysis VMs and CI build hosts by host or User. Pre-2026-02-17 clones contain the live files; after neutralization the same path is benign, so consider scoping alerts to endpoints that are not designated malware-lab hosts. Add the real repository folder name once identified.

8 more detection rules (Splunk SPL, Microsoft KQL, Sigma) · unlock with TL Creds. Sign up free to unlock the detection rules or query them with the Threadlinqs MCP server (Purple and Gold in full, 2 calls a day on a free account)
  • npm Lifecycle Script Spawning Shell with Credential or Download Activity (Shai-Hulud Pattern) · unlock with TL Creds
  • Mass User-Profile File Deletion by Script Interpreter (Shai-Hulud Test Script Impact) · unlock with TL Creds
  • Script Interpreter Upload to GitHub API or Paste/Webhook Endpoint with npm Credential Context · unlock with TL Creds
  • Shai-Hulud Detector Test Script Marker 'SIMULATED MALICIOUS SCRIPT' in PowerShell Script Block · unlock with TL Creds
  • Process Command Line Reading [indicator] and Process Environment Secrets (Shai-Hulud Credential Theft) · unlock with TL Creds
  • Creation of GitHub Repository Named Shai-Hulud via API or gh CLI · unlock with TL Creds
  • Shai-Hulud Test Script PowerShell Recursive Deletion of User Directories (T1485) · unlock with TL Creds
  • Shai-Hulud Test Script [indicator] and Environment Secret Harvest with Upload (T1552.001, T1567) · unlock with TL Creds

Indicators of compromise

As of 2026-10-16, Threadlinqs Intelligence tracks 8 indicators of compromise for TL-2026-3766.

8 indicators of compromise · unlock with TL Creds. Compare plans

Technical analysis

The maintainer neutralized them on 2026-02-17.

On 2026-02-16 G DATA (authors Tim Berghoff and Karsten Hahn) published 'Testing with live malware: Good Intentions, Problematic Execution'. The issue surfaced when a customer submitted the test files of a Shai-Hulud detection program to G DATA as suspected false detections. G DATA reviewed both the files and the program's source Git repository and found that the files were not inert simulations but exhibited real malicious behavior.

The files included PowerShell scripts that delete user directories (recursive file deletion), code that uploads data to threat actors, and credential-theft logic targeting environment variables and .npmrc files, i.e. a one-to-one replica of Shai-Hulud behavior. Comments inside the files labeled them 'SIMULATED MALICIOUS SCRIPT'. G DATA suspected that at least parts of the tool were developed with AI assistance ('vibe coding') and that an LLM, asked to produce files mimicking the worm, reproduced its behavior literally rather than generating safe stand-ins.

Risk: the files were not executed during normal operation of the detector. The danger was to users browsing the program folder who might double-click or run a test file, causing data loss (deleted user directories) or data exposure (upload to real threat actors). A secondary risk is accidental malware distribution through a security tool's repository and downstream copies. The article lists no CVEs, hashes, URLs, IPs or versions, and does not name the tool or maintainer; no attribution to a threat actor is made. The maintainer neutralized the test files on 2026-02-17, so the issue is resolved at source, but forks, clones and archived copies made before that date may still contain the functional files.

Background: Shai-Hulud is a self-replicating npm worm (first mass compromise in September 2025, >500 packages per CISA) that harvests environment variables, GitHub PATs and cloud API keys (AWS, GCP, Azure), exfiltrates them to an actor endpoint and to public GitHub repositories named 'Shai-Hulud', and republishes compromised packages using stolen npm credentials. Detection tooling for it is widely used, which makes accidentally live test corpora a notable hygiene lesson for security-tool authors using LLMs.

MITRE ATT&CK techniques by tactic:

Collection

T1005 Data from Local System

Execution

T1059.001 PowerShell; T1204.002 Malicious File

Initial Access

T1195.001 Compromise Software Dependencies and Development Tools

Impact

T1485 Data Destruction

Credential Access

T1552.001 Credentials In Files

Exfiltration

T1567 Exfiltration Over Web Service

Remediation

Patches

  • Maintainer neutralized the functional test files on 2026-02-17

Immediate actions

  • Do not open, double-click or execute any test/sample files in Shai-Hulud detector repositories or downloads
  • Update to a repository state at or after 2026-02-17 in which the maintainer neutralized the test files
  • Delete or quarantine older local clones, forks and archives of the detector that contain the live test scripts

Workarounds

  • Exclude or block the detector's test directory from execution and from user-writable launch paths until verified neutralized

Longer-term hardening

  • Store malware test corpora as inert, non-executable data (e.g. password-protected archives or pattern-only fixtures) and never as runnable scripts
  • Review AI-generated code and test fixtures for functional malicious behavior before committing
  • Run security-tool repositories and their samples in isolated VMs

Affected and fixed versions

  • Unnamed open-source maintainer — Shai-Hulud npm worm detection tool (not named in the G DATA article)
    Vulnerable versions: Versions containing functional test files prior to 2026-02-17
    Fixed in: Repository state after test files neutralized on 2026-02-17

Timeline

  • Original Shai-Hulud npm worm first detected (e.g. compromised @ctrl/tinycolor 5.0.3 published with a postinstall credential harvester), starting the first wave that grew past 500 packages.
  • Original Shai-Hulud npm worm compromise underway; CISA later advises pinning dependencies to versions published before 2025-09-16.
  • CISA publishes alert on the widespread npm supply chain compromise (500+ packages) by the Shai-Hulud worm.
  • New wave of the Shai-Hulud npm compromise reported by national CERTs (e.g. NCSC NZ), driving demand for detection tooling.
  • G DATA publishes analysis: a Shai-Hulud detector's test files, submitted by a customer as suspected false positives, were found to be functional malware (directory deletion, data upload), likely AI-generated.
  • Before publication, a customer submits the detector's test files to G DATA as suspected false detections; G DATA reviews the files and the program's Git repository and finds real malicious behavior (exact submission date not stated).
  • Maintainer neutralizes the functional test files, removing the execution risk.

Sources cited

Previous and next in supply chain

Further reading

AI-drafted from 7 cited sources; published ; last updated —.

Threadlinqs Intelligence — Real-Time Threat Detection Platform

// threat_feed
$ sort --newest
Showing all threats

Live intelligence console

Threat level

Latest Threats