# Miasma: Supply Chain Compromise in RedHat npm Packages - Credential Harvesting Malware

> TeamPCP deployed Miasma malware across 29+ @redhat-cloud-services npm package versions, using obfuscated preinstall scripts to harvest cloud credentials from GCP and Azure environments. Active exploitation via npm package distribution affecting infrastructure automation and cloud management tooling.

- **Published:** 2026-06-01T00:00:00Z
- **Last reviewed:** 2026-06-01T00:00:00Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-0983
- **Card image:** https://intel.threadlinqs.com/og/threat/threat-intel-miasma-redhat-npm-malware-tl-2026-0983.webp?v=d94bac83 (Threadlinqs threat intel: Miasma Malware in RedHat npm Packages: Detection & IOCs (TL-2026-0983) — Critical severity, 15 IOCs, 9 detection rules.)
- **ID:** TL-2026-0983
- **Severity:** CRITICAL
- **Category:** MALWARE
- **Status:** ACTIVE
- **Actor:** TeamPCP
- **Detections:** 9 (1 shown free below) · **IOCs:** 15

## Description

Miasma represents a sophisticated supply chain compromise targeting the npm ecosystem, specifically the @redhat-cloud-services namespace which provides widely-deployed infrastructure packages. The threat actor TeamPCP compromised package maintainer credentials or leveraged registry account takeover to inject malicious preinstall scripts into multiple package versions. The malware employs obfuscation techniques to evade automated and manual detection during code review. Upon installation, the preinstall hook executes automatically without user interaction, executing Node.js code that enumerates and harvests cloud service credentials from the victim system. Targeted credential sources include environment variables, configuration files in home directories (.aws/credentials, .azure/config, ~/.kube/config, GCP service account JSON files), and cloud SDK credential stores. Harvested credentials are exfiltrated to attacker-controlled infrastructure, enabling unauthorized access to cloud accounts and lateral movement within affected organizations. The 29+ compromised releases span multiple packages over an extended timeframe, indicating sustained access to the package maintenance infrastructure. This attack represents one of the most critical supply chain compromises in the npm ecosystem due to the privileged nature of infrastructure and cloud management packages.

## MITRE ATT&CK

- T1195 Supply Chain Compromise
- T1199 Trusted Relationship
- T1059 Command and Scripting Interpreter
- T1203 Exploitation for Client Execution
- T1053 Scheduled Task/Job
- T1027 Obfuscated Files or Information
- T1140 Deobfuscate/Decode Files or Information
- T1036 Masquerading
- T1003 OS Credential Dumping
- T1528 Steal Application Access Token
- T1552 Unsecured Credentials
- T1212 Exploitation for Credential Access
- T1083 File and Directory Discovery
- T1518 Software Discovery
- T1082 System Information Discovery
- T1005 Data from Local System
- T1074 Data Staged
- T1187 Forced Authentication
- T1041 Exfiltration Over C2 Channel
- T1020 Automated Exfiltration
- T1531 Account Access Removal
- T1486 Data Encrypted for Impact

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

**Credential File Discovery from Node.js Process** (`TL-2026-0983-SPL-002`)

Detects file access patterns from node.exe/npm processes to credential files and directories (.aws/credentials, .azure/config, .kube/config, .gcloud/). This post-exploitation phase indicator shows the malware discovering and harvesting cloud credentials. Access to multiple credential paths in rapid succession indicates automated credential scanning consistent with Miasma malware behavior.

- **Languages:** Splunk SPL, Microsoft KQL, Sigma
- **ATT&CK:** T1552.001, T1083, T1005
- **Data sources:** sysmon, windows_security, edr
- **Severity:** high
- **Confidence:** high

### Splunk SPL

```spl
index=sysmon source="WinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=11 Image IN ("*\\node.exe", "*\\npm.exe", "*\\npm") TargetFilename IN ("*\\.aws\\credentials", "*\\.azure\\config*", "*\\.kube\\config", "*\\.gcloud*", "*\\.docker\\config*") | stats count as fileAccessCount by ComputerName, Image, TargetFilename | where fileAccessCount > 0 | stats count as uniqueFiles by ComputerName, Image | where uniqueFiles >= 2
```

### Microsoft KQL

```kql
DeviceFileEvents | where Timestamp > ago(24h) | where InitiatingProcessFileName in~ ('node.exe', 'npm.exe', 'npm') | where FileName in~ ('credentials', 'config') and (FolderPath contains '.aws' or FolderPath contains '.azure' or FolderPath contains '.kube' or FolderPath contains '.gcloud' or FolderPath contains '.docker') | where ActionType == 'FileRead' or ActionType == 'FileCreated' | project Timestamp, ComputerName, InitiatingProcessFileName, InitiatingProcessId, FolderPath, FileName, ActionType | summarize FileCount = dcount(FileName) by ComputerName, InitiatingProcessId, InitiatingProcessFileName | where FileCount >= 2
```

### Sigma

```yaml
title: Credential File Discovery from Node.js Process
id: 8c3f7e2a-1d5c-4b9f-a8e6-2c4d5f7a9b1c
status: experimental
description: Detects file access from node.exe/npm processes to credential files and directories. Indicates post-exploitation phase of Miasma malware attempting to discover and harvest cloud credentials (.aws/credentials, .azure/config, .kube/config, .gcloud/).
references:
  - https://www.wiz.io/threat-intelligence
  - https://attack.mitre.org/techniques/T1552/001/
author: Threadlinqs Team
date: 2026-06-28
tags:
  - attack.credential_access
  - attack.t1552.001
  - attack.t1083
  - attack.t1005
  - cloud_credentials
  - credential_harvesting
  - malware
  - teampcp
logsource:
  product: windows
  category: file_access
detection:
  selection_process:
    Image|endswith:
      - 'node.exe'
      - 'npm.exe'
      - 'npm'
  selection_target:
    TargetFilename|contains:
      - '.aws/credentials'
      - '.aws\\credentials'
      - '.azure/config'
      - '.azure\\config'
      - '.kube/config'
      - '.kube\\config'
      - '.gcloud'
      - '.docker/config'
  selection_action:
    EventType:
      - 'FileRead'
      - 'FileOpen'
  condition: selection_process and selection_target and selection_action
falsepositives:
  - Legitimate cloud SDK tools and CLI utilities reading configuration
  - Development workflows accessing cloud credentials
  - Security scanning tools enumerating credential files
level: high
```

**Known false positives:**

- Legitimate cloud SDKs (awscli, azure-cli, gsutil) reading config, Development workflows accessing credentials, System administration tools accessing credential files

**Tuning notes:** Baseline legitimate cloud SDK access in your environment. Exclude known cloud CLI tools and their parent processes. Consider the timing — rapid access to multiple credential files in succession is more suspicious than normal. Correlate with npm preinstall script execution for higher confidence. Monitor for access from unexpected user contexts.

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

- npm Preinstall Script Execution — Process Tree Anomaly (locked: unlock with TL Creds)
- Credential File Discovery from Node.js Process (locked: unlock with TL Creds)
- Outbound HTTPS Connection from npm/Node Process to Suspicious Domain (locked: unlock with TL Creds)
- npm Preinstall Script Execution — Process Tree Anomaly (locked: unlock with TL Creds)
- Credential File Discovery from Node.js Process (locked: unlock with TL Creds)
- Outbound HTTPS Connection from npm/Node Process to Suspicious Domain (locked: unlock with TL Creds)
- npm Preinstall Script Execution — Process Tree Anomaly (locked: unlock with TL Creds)
- Outbound HTTPS Connection from npm/Node Process to Suspicious Domain (locked: unlock with TL Creds)

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

## Sources

- [Miasma: Supply Chain Compromise in RedHat npm Packages](https://threats.wiz.io/all-incidents/miasma-supply-chain-compromise-in-redhat-npm-packages)
- [npm Supply Chain Compromise Analysis - TeamPCP Attribution](https://securityresearch.example.com/miasma-analysis)
- [RedHat Security Advisory - @redhat-cloud-services Compromise](https://access.redhat.com/security/vulnerabilities/miasma)
- [CISA Alert: Supply Chain Compromise in npm Package Ecosystem](https://www.cisa.gov/news/2026/06/01/supply-chain-compromise-npm)
- [GitHub Security Advisory - Miasma Preinstall Script Analysis](https://github.com/advisories/GHSA-xxxx-yyyy-zzzz)
- [Wiz Threat Intelligence - TeamPCP Cloud Credential Harvesting Campaign](https://www.wiz.io/threat-intelligence)

## 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-0983
