What exactly happened?
On 29 April 2026, four official SAP software packages were infected with malware on the npmjs.com platform. The attackers call themselves “TeamPCP” and named the operation “Mini Shai-Hulud” (a reference to the worms from the science-fiction novel “Dune”).
The packages are core building blocks for SAP cloud development and are downloaded over 2.2 million times a month combined:
⚠
@cap-js/sqlite version 2.2.2⚠
@cap-js/postgres version 2.2.2⚠
@cap-js/db-service version 2.10.1⚠
mbt (Cloud MTA Build Tool) version 1.2.48Window: approx. 2–4 hours on 29 April 2026
SAP cleaned up the packages within a few hours and published Security Note 3747787 on 30 April.
What does the malware do?
As soon as one of the infected packages is downloaded, the following happens – automatically and invisibly:
- A hidden script runs on download (not only when used)
- It downloads an additional runtime (“Bun”)
- An 11-megabyte obfuscated payload scans the machine for credentials
- Data found is encrypted – only the attacker can read it
- The data is uploaded to the victim's GitHub repositories
- Using stolen tokens, the worm tries to spread into further packages
What gets stolen?
- GitHub credentials – access to your source code
- npm tokens – the attacker can publish packages in your name
- AWS access keys – access to your Amazon cloud
- Azure and Google Cloud credentials – access to Microsoft/Google cloud
- SSH keys – access to servers
- SAP BTP service keys – access to your SAP cloud services
- Environment variables – often containing database passwords and API keys
Am I affected? How to check
Ask your development team (or your external BTP provider):
- “Did we run
npm installanywhere on 29 April – manually or automated?” - “Do we use the packages @cap-js/sqlite, @cap-js/postgres, @cap-js/db-service or mbt?”
- “Do we have automated build pipelines that run regularly?”
Technical checks (for your development team):
- Search all
package-lock.jsonfor the four affected versions - Check container images, build caches and artifact repositories
- Compare SHA-512 hashes against SAP Note 3747787
- Check GitHub repos for branches named
shai-hulud - Workflow-Dateien:
.github/workflows/discussion.yamlodershai-hulud-workflow.yml - Look for self-hosted runners named “SHA1HULUD”
- Commits with the signature “OhNoWhatsGoingOnWithGitHub:[Base64]”
What do I need to do NOW?
Step 1: Check
Search all lockfiles, container images, build caches and artifact repositories for the four affected package versions.
Step 2: Isolate
Immediately disconnect affected developer machines and build servers from the network.
Step 3: Rebuild
Completely re-image affected systems. Don't just delete the package.
Step 4: Rotate all credentials
Treat every credential on affected systems as compromised: GitHub tokens, npm tokens, AWS/Azure/GCP keys, SSH keys, SAP BTP service keys, all passwords in environment variables.
Step 5: Check cloud logs
Check AWS CloudTrail, Azure Activity Logs and GCP Audit Logs for unusual API calls from developer IPs or build servers.
Step 6: Apply updates
Update to the cleaned package versions.
How do I protect myself in future?
“Make sure automatic script execution on package downloads is disabled (
npm config set ignore-scripts true), that package versions are pinned, and that sensitive credentials live in a credential manager, not in environment variables.”- ignore-scripts:
npm config set ignore-scripts true - Lockfiles:
npm ciinstead ofnpm install - OIDC: trusted publishers only for individual workflows, not entire repos
- Credential management: no secrets in environment variables
- Monitoring: GitHub search for “A Mini Shai-Hulud has Appeared” as an early warning
Technical details
Attack: Mini Shai-Hulud (TeamPCP) Date: 29 April 2026 SAP Note: 3747787 Affected packages: 4 npm packages (SAP CAP + MTA) Downloads/month: ~2.2 million (combined) Victims (known): 1,800+ GitHub repos compromised Payload: execution.js (11 MB, obfuscated) Encryption: AES-256-GCM + RSA-4096 Exfiltration: victim's GitHub repos Self-propagation: Yes (via stolen npm tokens) Anti-analysis: Inactive under Russian language SAP component: BC-XS-CDX-NJS