Miasma Campaign Uses Red Hat npm Packages to Steal Developer Secrets

· Original article ↗

Summary

Researchers report that the Miasma campaign used compromised Red Hat npm packages to steal developer credentials and cloud secrets, abuse CI/CD workflows, and persist in developer tools. Evidence points to a compromised employee GitHub account; attribution remains incon

Key points

  • Researchers report that multiple @redhat-cloud-services npm packages contained an obfuscated preinstall hook designed to collect credentials and secrets.
  • The malware targets GitHub Actions, npm, cloud and Kubernetes credentials, Vault material, SSH keys, and Git credentials.
  • Researchers describe encrypted exfiltration via the GitHub API and attacker-created public repositories, with GitHub also used as a fallback.
  • The malware can alter GitHub workflows and establish persistence through Claude Code and Visual Studio Code configuration.
  • Wiz researchers say this variant adds GCP and Azure identity collectors and generates a uniquely encrypted payload for each infection.
  • Evidence suggests a compromised Red Hat employee GitHub account was used to push malicious commits; the threat actor remains unknown.
  • Recommended response includes isolating affected hosts, removing malicious package versions, rotating exposed credentials, and reviewing persistence and CI/CD activity.

Article Details

Attack Vectors
  • Compromised @redhat-cloud-services npm packages used an obfuscated preinstall hook to execute malware on installation.
  • The payload collected GitHub Actions secrets, npm tokens, cloud credentials, Kubernetes and Vault material, SSH keys, Git credentials, and other sensitive files.
  • The malware encrypted stolen data and exfiltrated it through GitHub API commits to attacker-created public repositories; the article also reports transmission to api.anthropic[.]com:443/v1/api.
  • Using stolen access, the malware enumerated writable GitHub repositories, read workflow files, and committed a workflow through the GitHub API.
  • The payload attempted privilege escalation by launching a container that bind-mounted the host’s /etc/sudoers.d and granted the CI runner passwordless sudo.
  • It checked for endpoint protection before malicious actions, avoided execution on Russian-language systems, and established persistence through Claude Code and Visual Studio Code configuration hooks.
Defensive Notes
  • Isolate hosts that installed affected package versions and remove the malicious versions.
  • Rotate exposed credentials and review GitHub and npm activity for suspicious actions.
  • Audit configuration files for persistence artifacts, including ~/.claude/settings.json, .vscode/tasks.json, .github/workflows/codeql.yml, and .github/setup.js.
  • For CI/CD systems, suspend affected workflow runs, invalidate build artifacts created during the exposure window, and review releases, container images, packages, and deployments created after installation.
  • Do not treat uninstalling the npm package or deleting node_modules as sufficient cleanup; the article warns that background execution and developer-tool persistence may remain.

MITRE ATT&CK

Malware

Vendors

Products

Related Articles