# GHAPPIER Loader: npm Trusted-Publishing Abuse Compromises @dforge-core/dforge-mcp

> An attacker compromised the maintainer account of the npm package @dforge-core/dforge-mcp and abused GitHub Actions OIDC trusted publishing and Sigstore attestation to ship trojanized versions 0.2.20 and 0.2.21, delivering a previously unreported four-stage, self-deleting loader (GHAPPIER) that opens a remote shell when the MCP server launches. CloudSEK links a second payload family to the DPRK-linked PolinRider campaign, active since March 2026 across 65+ repositories, 73 files, and 22 accounts.

- **Published:** 2026-09-21T00:00:00Z
- **Last reviewed:** 2026-09-21T00:00:00Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-2605
- **Card image:** https://intel.threadlinqs.com/og/threat/threat-intel-ghappier-trusted-publishing-npm-tl-2026-2605.webp?v=7e1c73c4 (Threadlinqs threat intel: GHAPPIER npm Loader GitHub Actions OIDC: Detection & IOCs (TL-2026-2605) — High severity, 21 IOCs, 9 detection rules.)
- **ID:** TL-2026-2605
- **Severity:** HIGH
- **Category:** SUPPLY_CHAIN
- **Status:** ACTIVE
- **Actor:** PolinRider (North Korea)
- **Detections:** 9 (1 shown free below) · **IOCs:** 21

## Description

On September 9, 2026, an unidentified attacker gained control of the maintainer account for the npm package @dforge-core/dforge-mcp — a legitimate Model Context Protocol (MCP) server exposing 34 tools that let AI coding agents (Claude Code, Cursor, Zed) scaffold, build, and ship dForge modules — for a window of 105 minutes. CloudSEK's investigation found the attacker already held push access to the package's main branch at the start of the intrusion and assesses the likely root cause as a developer workstation infected by a malicious extension or package, though the initial infection vector itself remains unconfirmed. Using that access, the attacker modified the GitHub Actions release workflow (a three-line change to trigger release on any push to main), then 14 minutes later rewrote the workflow again to make publishing fully unattended. Two trojanized releases followed: version 0.2.20, which failed to become the active release, and version 0.2.21, which published successfully with valid npm provenance and a Sigstore attestation and remained the registry's 'latest' tag for 35 minutes 38 seconds before the legitimate maintainer reverted the account and shipped a clean 0.2.22.

Version 0.2.21 carried a single-line loader — dubbed GHAPPIER by CloudSEK — embedded at line 3,320 of an otherwise-unremarkable 99KB file. The loader does not execute on install; it fires only when the MCP server process is actually launched, meaning any environment that merely installed 0.2.21 as a dependency without starting the server was never compromised. Once triggered, GHAPPIER runs as a four-stage progression culminating in a general-purpose remote shell; the final-stage implant then deletes itself from disk the moment it finishes executing, removing the on-disk artifact while, per CloudSEK, remaining live and responsive for at least five days after the compromised account was recovered. CloudSEK frames the incident as an authorization-chain failure rather than a code-signing break: 'every action in this report is an authorised action taken with a stolen key' — npm/Sigstore provenance attests where an artifact was built, not whether the commit that triggered the build was honest, and the fraudulent attestation remains permanently visible in Sigstore's public transparency log, which is how the attacker's commit was ultimately identified.

CloudSEK ties a second payload family observed in the same investigation to PolinRider, a DPRK-linked loader/credential-harvesting campaign that OpenSourceMalware has tracked since March 2026 and which by CloudSEK's count now spans 65+ public repositories, 73 infected files, and 22 compromised accounts. CloudSEK reports that payload family reads its runtime configuration from empty Ethereum transactions (roughly $0.20 each), a blockchain dead-drop-resolver pattern consistent with PolinRider's documented use of TRON, Aptos, and BNB Smart Chain RPC endpoints elsewhere in the campaign. Attribution is contested: The Hacker News, Rescana, and OpenSourceMalware attribute the broader PolinRider/'Contagious Interview' cluster to North Korea's Lazarus Group and APT37 (ScarCruft) with high confidence, but CloudSEK states its own independent verification of the North Korea linkage for this specific incident was inconclusive — this research therefore records the actor as the PolinRider cluster with LOW attribution confidence pending corroboration. The campaign's other confirmed activity — a June 2026 Sonatype-tracked compromise of the unrelated npm package @common-stack/generate-plugin across 13 versions using the same 'rmcej%otb%' obfuscation decoder seed, widespread injection of obfuscated JavaScript into config files such as postcss.config.mjs, tailwind.config.js, and eslint.config.mjs, VS Code .vscode/tasks.json runOn:'folderOpen' auto-execution abuse, and anti-dated git-history rewriting — illustrates PolinRider's broader tradecraft, though none of those specific artifacts were confirmed present in the dforge-mcp compromise itself.

CloudSEK found no evidence of successful downstream organizational compromise and no exploitation of GitHub- or npm-platform vulnerabilities — the entire chain rode on a single stolen credential plus the trust normally placed in provenance attestation. As of the report date, no CVE had been assigned and no advisory existed in OSV or the GitHub Advisory Database for @dforge-core/dforge-mcp. Because this is the first confirmed abuse of npm trusted-publishing/OIDC to smuggle a working remote-access implant into an AI-agent tool's supply chain, and because the affected package sits directly in the MCP tool-installation path for Claude Code, Cursor, and Zed users, the incident is significant beyond its narrow, contained blast radius. CloudSEK's recommended defense — treating unexpected release-workflow modifications and multi-stage artifact patterns as the detection signal, rather than attempting to signature the self-deleting implant itself — reflects that provenance attestation alone is an insufficient trust boundary.

## MITRE ATT&CK

- T1195.002 Compromise Software Supply Chain
- T1078 Valid Accounts
- T1059.007 JavaScript
- T1027 Obfuscated Files or Information
- T1070.004 File Deletion
- T1071.001 Web Protocols
- T1102.001 Dead Drop Resolver
- T1555.003 Credentials from Web Browsers
- T1552.001 Credentials In Files
- T1608.001 Upload Malware

## Free detection (Splunk SPL, Microsoft KQL, Sigma)

**GHAPPIER Self-Deleting Implant & Browser Credential-Store Access (SPL)** (`TL-2026-2605-SPL-002`)

Detects the GHAPPIER post-exploitation pattern: a Node.js MCP-server process spawning a command shell (the remote-shell stage), a file under node_modules/@dforge-core/dforge-mcp being created then deleted within a short window (the self-deleting implant behavior CloudSEK documents), and/or a node-spawned process reading browser credential-store files. Primary detection surface is the SPL flavor of a shared post-exploitation rule.

- **Languages:** Splunk SPL, Microsoft KQL, Sigma
- **ATT&CK:** T1059.007, T1027, T1070.004, T1555.003, T1552.001
- **Data sources:** sysmon_process_creation, sysmon_file_events, defender_for_endpoint_devicefileevents, defender_for_endpoint_deviceprocessevents
- **Severity:** critical
- **Confidence:** medium

### Splunk SPL

```spl
index=sysmon sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational"
(EventCode=1 ParentImage="*\\node.exe" (Image="*\\cmd.exe" OR Image="*\\powershell.exe" OR Image="*\\bash" OR Image="*\\sh"))
OR (EventCode=11 TargetFilename="*\\node_modules\\@dforge-core\\dforge-mcp\\*")
OR (EventCode=23 TargetFilename="*\\node_modules\\@dforge-core\\dforge-mcp\\*")
| eval action=case(EventCode=1,"shell_spawn",EventCode=11,"file_create",EventCode=23,"file_delete")
| transaction host TargetFilename startswith=eval(action="file_create") endswith=eval(action="file_delete") maxspan=5m
| where duration<300
| append
    [ search index=sysmon sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=11 ParentImage="*\\node.exe"
      TargetFilename IN ("*\\Login Data","*\\Cookies","*\\Web Data")
      | table _time host User Image TargetFilename ]
| table _time host User Image TargetFilename action duration
| sort - _time
```

### Microsoft KQL

```kql
let Creates = DeviceFileEvents
| where Timestamp > ago(24h)
| where ActionType == "FileCreated"
| where FolderPath has @"node_modules\@dforge-core\dforge-mcp";
let Deletes = DeviceFileEvents
| where Timestamp > ago(24h)
| where ActionType == "FileDeleted"
| where FolderPath has @"node_modules\@dforge-core\dforge-mcp";
Creates
| join kind=inner Deletes on DeviceId, FileName
| where (Timestamp1 - Timestamp) between (0s .. 5m)
| project DeviceId, FileName, Created = Timestamp, Deleted = Timestamp1, FolderPath
| union (
    DeviceProcessEvents
    | where Timestamp > ago(24h)
    | where InitiatingProcessFileName in~ ("node.exe","node")
    | where FileName in~ ("cmd.exe","powershell.exe","bash","sh")
    | project DeviceId, FileName, Created = Timestamp, Deleted = Timestamp, FolderPath = ProcessCommandLine
)
| union (
    DeviceFileEvents
    | where Timestamp > ago(24h)
    | where InitiatingProcessFileName in~ ("node.exe","node")
    | where FileName in~ ("Login Data","Cookies","Web Data")
    | project DeviceId, FileName, Created = Timestamp, Deleted = Timestamp, FolderPath
)
| sort by Created desc
```

### Sigma

```yaml
title: Node.js Process Spawning Command Shell (Possible GHAPPIER Remote Shell)
id: b2f5d3c1-8e4f-4a2b-9d3b-7e9f2c4f6b12
status: experimental
description: Detects a Node.js process (MCP server runtime) spawning a command interpreter as a child process, consistent with the GHAPPIER loader opening a remote shell when the compromised dforge-mcp server launches, and the loader's self-deleting on-disk artifact and browser credential-store access.
references:
    - https://www.cloudsek.com/blog/ghappier-malware-loader-npm-supply-chain-attack
author: Threadlinqs Team
date: 2026-09-21
tags:
    - attack.execution
    - attack.t1059.007
    - attack.defense-evasion
    - attack.t1070.004
    - attack.credential-access
    - attack.t1555.003
    - attack.t1552.001
logsource:
    category: process_creation
    product: windows
detection:
    selection_parent:
        ParentImage|endswith:
            - '\node.exe'
    selection_child:
        Image|endswith:
            - '\cmd.exe'
            - '\powershell.exe'
            - '\bash.exe'
            - '\wsl.exe'
    filter_known_scripts:
        CommandLine|contains:
            - 'npm run'
            - 'npm-cli.js'
    condition: selection_parent and selection_child and not filter_known_scripts
falsepositives:
    - Legitimate npm scripts that shell out via child_process for build tasks (node-gyp, electron-builder)
    - Developer tooling that intentionally spawns a shell from a Node-based CLI
level: high
```

**Known false positives:**

- npm/build tooling that legitimately spawns a shell for postinstall or build scripts (node-gyp, electron-builder)
- Package managers/installers that create then quickly remove temporary files under node_modules during normal install/uninstall/prune operations
- EDR/AV or backup agents reading browser credential-store files for legitimate scanning purposes

**Tuning notes:** Baseline your org's legitimate node-spawns-shell build tooling (list known postinstall scripts) and add them to the filter; narrow the create/delete correlation window and require it originate specifically from a node_modules/@dforge-core path to cut noise from routine package churn. Treat a hit that combines the self-delete pattern with credential-store file access in the same session as high-confidence and auto-escalate to isolate the host per the researched immediate-remediation guidance (rotate all reachable credentials, since the implant may remain live after deleting its artifact).

### 8 more detection rules (Splunk SPL, Microsoft KQL, Sigma), unlock with TL Creds

- npm Trusted-Publishing Workflow Tampering & Trojanized dforge-mcp Install (KQL) (locked: unlock with TL Creds)
- GHAPPIER Self-Deleting Implant & Browser Credential-Store Access (KQL) (locked: unlock with TL Creds)
- Blockchain Dead-Drop C2 Resolution & PolinRider/DPRK-Linked Infrastructure Beaconing (KQL) (locked: unlock with TL Creds)
- npm Trusted-Publishing Workflow Tampering & Trojanized dforge-mcp Install (Sigma) (locked: unlock with TL Creds)
- GHAPPIER Self-Deleting Implant & Browser Credential-Store Access (Sigma) (locked: unlock with TL Creds)
- Blockchain Dead-Drop C2 Resolution & PolinRider/DPRK-Linked Infrastructure Beaconing (Sigma) (locked: unlock with TL Creds)
- npm Trusted-Publishing Workflow Tampering & Trojanized dforge-mcp Install (SPL) (locked: unlock with TL Creds)
- Blockchain Dead-Drop C2 Resolution & PolinRider/DPRK-Linked Infrastructure Beaconing (SPL) (locked: unlock with TL Creds)

Sign up free to unlock the detection rules: https://threadlinqs.com/?modal=signup

## Sources

- [Attackers Abuse npm Trusted Publishing to Compromise dforge-mcp Package](https://www.infosecurity-magazine.com/news/attackers-abuse-npm-trusted/)
- [GHAPPIER - One loader, sixty-five repositories, twenty-two accounts: an unreported loader family beside DPRK's PolinRider campaign](https://www.cloudsek.com/blog/ghappier-malware-loader-npm-supply-chain-attack)
- [North Korean Hackers Publish 108 Malicious Packages and Extensions in PolinRider Campaign](https://thehackernews.com/2026/07/north-korean-hackers-publish-108.html)
- [PolinRider Jumps the Fence to Go, Packagist, npm, PyPI](https://opensourcemalware.com/blog/polinrider-jumps-the-fence)
- [Hijacked npm Package Nearly Delivers PolinRider RAT](https://www.sonatype.com/blog/hijacked-npm-package-attempts-to-deliver-polinrider-linked-rat)
- [Active Exploitation Alert: North Korean PolinRider Supply Chain Attack Targets npm, Packagist, Go Modules, and Chrome Extensions](https://www.rescana.com/post/active-exploitation-alert-north-korean-polinrider-supply-chain-attack-targets-npm-packagist-go-modules-and-chrome-extens)
- [dforge-mcp (GitHub repository)](https://github.com/dforge-core/dforge-mcp)
- [Multiple trusted publishing configurations for npm](https://github.blog/changelog/2026-09-03-multiple-trusted-publishing-configurations-for-npm/)

## Full data

The other 8 detection rules (Splunk SPL / Microsoft KQL / Sigma) unlock with TL Creds; a free account includes daily creds: https://threadlinqs.com/?modal=signup
Indicator values unlock with TL Creds, at a lower price on Red and Purple; AI agents can query rules and IOCs through the Threadlinqs MCP server (Purple): https://intel.threadlinqs.com/mcp

Canonical: https://intel.threadlinqs.com/threat/TL-2026-2605
