Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Malicious code in @redhat-cloud-services/patch-client (npm)

0
Critical
Published: 06/01/2026 (06/01/2026, 00:00:00 UTC)
Source: GCVE Database
Product: @redhat-cloud-services/patch-client

Description

Part of the "Mini Shai-Hulud" supply chain worm campaign that compromised the GitHub Actions OIDC trusted publisher shared by Red Hat Cloud Services npm packages. The attacker injected a `preinstall` hook into this and 31 other packages in the `@redhat-cloud-services` scope. The hook delivers a three-layer obfuscated payload (ROT-9 Caesar cipher over a 1.27M-entry character-code array -> AES-128-GCM decryption with hardcoded keys -> stacked obfuscator.io encoding with PBKDF2+SHA-256 keystream S-box substitution) that downloads a pinned Bun runtime (v1.3.13) from GitHub to execute the worm outside the victim's Node installation. **Credential theft:** Harvests AWS credentials (IMDS, ECS, Secrets Manager, SSM), Azure managed identities, GCP service account tokens, HashiCorp Vault tokens, Kubernetes service account tokens (`/var/run/secrets/kubernetes.io/serviceaccount/token`), GitHub PATs, npm publish tokens, environment variables from ~40 CI platforms (CircleCI, Travis CI, Jenkins, and others), password manager stores (Bitwarden, gopass), and local files (`~/.npmrc`, `~/.netrc`, shell history, database history). Collected data is exfiltrated to attacker-controlled public GitHub repositories. **Privilege escalation:** Exploits Docker socket access to escape containers and modify `/etc/sudoers.d`, granting passwordless sudo to CI runner user accounts. **Self-propagation:** Uses stolen npm credentials to republish tampered tarballs of target packages. Injects a malicious CodeQL workflow into accessible GitHub repositories via the GraphQL `createCommitOnBranch` mutation, exchanges GitHub Actions OIDC tokens for npm publish tokens, and signs the resulting artifacts through Sigstore (Fulcio/Rekor) to appear legitimate. **Persistence and evasion:** Installs a daemon at `/tmp/kitty-<random>`, hijacks `.claude/settings.json` for AI agent persistence, and hijacks `.vscode/tasks.json` for editor task execution. Detects sandbox environments via `__FAKE_PLATFORM__`, `TESTING_TAR_FAKE_PLATFORM__`, and `__IS_DAEMON` environment variables, and probes for EDR tools (CrowdStrike, SentinelOne, Carbon Black, StepSecurity Harden-Runner). --- _-= Per source details. Do not edit below this line.=-_ ## Source: ghsa-malware (49d8b1caef5f68000275960ce6445e14daaaaa646744a3c2223b8e9e0193f354) Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.

Affected software

npmghsa
@redhat-cloud-services/patch-client
Affected versions
=4.0.4=4.0.5=4.0.7

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/11/2026, 10:06:53 UTC

Technical Analysis

This threat involves malicious code injected into the @redhat-cloud-services/patch-client npm package (versions 4.0.4, 4.0.5, and 4.0.7) as part of a supply chain worm campaign targeting the GitHub Actions OIDC trusted publisher shared by Red Hat Cloud Services npm packages. The attacker inserted a preinstall hook delivering a multi-layer obfuscated payload that downloads a Bun runtime to execute the worm outside the Node environment. The malware harvests extensive credentials and tokens from AWS, Azure, GCP, HashiCorp Vault, Kubernetes, GitHub, npm, various CI platforms, password managers, and local files, exfiltrating data to public GitHub repositories. It escalates privileges by exploiting Docker socket access to gain passwordless sudo for CI runner accounts. Self-propagation occurs through republishing tampered npm packages, injecting malicious CodeQL workflows via GitHub GraphQL API, and signing artifacts with Sigstore to appear legitimate. Persistence mechanisms include daemon installation and hijacking of AI agent and editor configuration files. The malware also detects sandbox and EDR environments to evade analysis and detection. Due to the extensive compromise, affected systems should be treated as fully compromised with immediate secret rotation and package removal.

Potential Impact

The impact is severe as the malware compromises system integrity and confidentiality by harvesting a broad range of sensitive credentials and tokens across multiple cloud providers, CI platforms, and local environments. It enables privilege escalation to gain elevated access on affected systems. The worm self-propagates by tampering with npm packages and GitHub workflows, increasing the attack surface and persistence. The presence of this malware means full system compromise, with attacker control potentially established beyond the initial infection. Credential theft and privilege escalation facilitate further lateral movement and data exfiltration. The malware's evasion techniques reduce the likelihood of detection by security tools.

Mitigation Recommendations

No official patch or fix is currently documented for this malicious package compromise. Immediate mitigation requires removing the affected @redhat-cloud-services/patch-client package versions 4.0.4, 4.0.5, and 4.0.7 from all systems. All credentials, tokens, and secrets stored or accessible on compromised systems must be rotated immediately from a separate, trusted environment. Due to the high likelihood of full system compromise, consider rebuilding affected systems from known good backups or reinstalling operating systems. Monitor for signs of persistence such as daemons in /tmp/kitty-<random> and hijacked configuration files (.claude/settings.json, .vscode/tasks.json). Review GitHub repositories for unauthorized CodeQL workflows and revoke any suspicious tokens or credentials. Follow vendor and security community advisories for updates on remediation and detection.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
MAL-2026-5145
Osv Schema Version
1.7.4
Aliases
["GHSA-vx4h-8456-6pp3"]
Ecosystems
["npm"]
Database Specific Severity
null
Cvss Version
null

Threat ID: 6a520ee368715ace4391abac

Added to database: 07/11/2026, 09:37:39 UTC

Last enriched: 07/11/2026, 10:06:53 UTC

Last updated: 07/22/2026, 08:43:30 UTC

Views: 8

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses