# TeamPCP Escalates Supply Chain Attacks with 'Mini Shai-Hulud' Campaign Targeting SAP npm Ecosystem
TeamPCP has compromised multiple npm packages for SAP's cloud application development stack, marking a significant expansion of the threat actor's supply chain attack operations and demonstrating the continued vulnerability of enterprise software supply chains.
## The Threat
Researchers have identified a new supply chain attack campaign in which the infamous threat actor TeamPCP has successfully compromised npm packages used by developers building applications on SAP's cloud platform. The attack, dubbed "Mini Shai-Hulud," represents a calculated escalation of TeamPCP's existing supply chain tactics and reveals a sophisticated understanding of how to infiltrate widely-used development dependencies targeting enterprise customers.
The compromised packages were discovered in the SAP Cloud Application Programming Model (CAP) ecosystem, which is used by thousands of developers building cloud-native applications on SAP's BTP (Business Technology Platform). The attack demonstrates that supply chain threats are no longer limited to small, overlooked libraries—they now directly target dependencies within enterprise development frameworks.
## Background and Context
### TeamPCP's Attack History
TeamPCP has established itself as a prolific threat actor specializing in supply chain attacks over the past 18-24 months. The group has demonstrated:
Previous TeamPCP campaigns have affected hundreds of thousands of downstream consumers, with some estimates suggesting exposure to millions of developers indirectly.
### Why SAP Matters
SAP is one of the world's largest enterprise software vendors, with systems running critical business processes for over 400,000 organizations globally. The SAP BTP cloud platform hosts applications managing:
An attack on the SAP development ecosystem means potential compromise of applications that directly impact enterprise operations and sensitive business data.
## Technical Details: The 'Mini Shai-Hulud' Attack Mechanism
The "Mini Shai-Hulud" attack employs several sophisticated techniques:
### Attack Vector
| Phase | Technique | Purpose |
|-------|-----------|---------|
| Injection | Obfuscated JavaScript in package.json scripts | Execute code during npm install |
| Detection Evasion | Environment checks; skip execution in CI/CD detection | Avoid triggering automated security scanning |
| Payload Staging | Two-stage download from attacker infrastructure | Retrieve actual malicious code after installation |
| Persistence | Modify build artifacts and configuration files | Ensure payload remains in deployed application |
| Exfiltration | Harvest environment variables and configuration | Extract credentials and API keys |
### How It Works
When a developer installs an affected package via npm install, the malicious code executes during the installation phase through npm's postinstall scripts. The payload:
1. Checks the environment – determines if it's running in an automated security scanning environment, CI/CD pipeline, or a legitimate development machine
2. Avoids detection – if detected as a security tool, the script exits cleanly without executing malicious code
3. Downloads second-stage payload – connects to attacker-controlled infrastructure to retrieve the actual malicious code
4. Harvests credentials – extracts environment variables containing API keys, authentication tokens, and database credentials
5. Modifies build output – injects malicious code into compiled application artifacts
The sophistication of environment detection is notable—TeamPCP has implemented checks for common security tools, CI/CD platforms, and containerized environments, demonstrating awareness of modern development practices.
## Scope and Impact
### Affected Packages
The attack targeted packages within the SAP CAP framework, which includes:
Researchers confirmed compromises in at least 5-7 versions of popular SAP packages, with distribution through npm's public registry for several weeks before detection.
### Downstream Exposure
The impact cascades through the SAP ecosystem:
Early estimates suggest 5,000-10,000 development environments were likely compromised, with hundreds of production deployments potentially affected.
## Implications for Organizations
### Immediate Risks
Credential compromise: Developers routinely store SAP BTP credentials, database passwords, and API keys as environment variables. An attacker obtaining these credentials gains direct access to enterprise systems.
Supply chain persistence: Unlike traditional malware, supply chain compromises persist in the build artifacts and are deployed to production systems, making them difficult to detect and remove.
Lateral movement: Compromised applications provide attackers with a foothold inside SAP environments, enabling them to move laterally across interconnected systems.
### Broader Implications
This attack underscores a critical vulnerability in modern software development:
## Detection and Response
The attack was discovered through:
Organizations affected by this campaign should:
1. Audit npm package installations – review package-lock.json and yarn.lock files for affected versions
2. Rotate all credentials – any secrets stored as environment variables during the compromise window must be considered exposed
3. Review access logs – check SAP BTP audit logs for unauthorized access using harvested credentials
4. Scan deployed artifacts – analyze production applications for injected malicious code
5. Update immediately – SAP has released patched versions of all affected packages
## Recommendations
### For Development Teams
### For Security and Operations Teams
### For Enterprise Risk Management
## Conclusion
The TeamPCP "Mini Shai-Hulud" campaign represents a maturation of supply chain attack tactics—moving from targeting obscure packages to directly compromising frameworks used by enterprise development teams. The attack's sophistication, evasion techniques, and scale demonstrate that software supply chains have become a critical security frontier.
Organizations using SAP's cloud platform should treat this incident with urgency. The combination of compromised credentials and access to enterprise systems creates substantial risk that extends far beyond the affected npm packages themselves.