سامي
سامي الغامدي
مستشار Fyntralink · متاح الآن
مدعوم بالذكاء الاصطناعي · Fyntralink

Mini Shai-Hulud Supply Chain Attack: SAMA Bank DevSecOps Risk

A new worm campaign compromised PyTorch Lightning, intercom-client and 1,800+ developer repos across npm, PyPI and PHP. Here is what SAMA-regulated banks must do now.

F
FyntraLink Team

A self-propagating worm campaign dubbed Mini Shai-Hulud has torn through the open-source ecosystem this week, compromising more than 1,800 developer repositories across npm, PyPI and PHP. Among the casualties are high-profile packages like PyTorch Lightning (versions 2.6.2 and 2.6.3) and intercom-client, which together pull nearly 10 million monthly downloads. For Saudi banks running modern DevOps pipelines, this is not a developer problem — it is a board-level supply chain risk.

How the Mini Shai-Hulud worm operates

First detected on April 29, 2026 in four malicious SAP npm packages, the campaign — attributed by researchers to a cluster tracked as TeamPCP — uses npm preinstall scripts and Python import hooks to execute attacker code the moment a poisoned package is pulled into a build. The Lightning PyPI variant ships a hidden _runtime directory containing an obfuscated downloader; once executed, the payload harvests environment variables, cloud tokens, .npmrc credentials and SSH keys, then republishes the stolen secrets to a new GitHub repository created under the victim developer's own account. The intercom-php 5.0.2 release on Packagist (a package with 20+ million lifetime downloads) extended the blast radius to PHP shops as well.

Why this is different from a typical typosquat

Mini Shai-Hulud is not a single rogue package — it is a worm. Each compromised developer machine becomes a launchpad: the malware enumerates other packages the developer can publish, injects the same loader into them, and pushes new versions back to the registry. That is how a campaign that began with four SAP packages mushroomed into 1,800 affected repositories in 48 hours. It also explains why traditional allow-listing of "trusted maintainers" gives a false sense of safety: the attacker rides the trust chain of legitimate publishers.

Impact on Saudi financial institutions

Banks regulated under the SAMA Cyber Security Framework and the SAMA Cloud Computing Cybersecurity Controls (CCC) are explicitly required to manage third-party and software supply chain risk (CSF subdomains 3.3.14 Third-Party and 3.3.15 Cloud Computing). The same expectation appears in NCA ECC-2:2024 control 2-10 (Third-Party and Cloud Computing Cybersecurity) and is reinforced for payment environments by PCI DSS v4.0.1 requirements 6.3.2 and 12.8. A poisoned npm package that ends up in an internet banking app, a SWIFT integration layer or a card processing microservice would constitute both a control failure and, depending on data exposure, a notifiable incident under SAMA's Cyber Incident Reporting requirements and Article 22 of the PDPL.

Recommendations and practical next steps

  1. Pin and verify dependencies. Lock package versions in package-lock.json, pnpm-lock.yaml and poetry.lock. Block the floating versions pytorch-lightning==2.6.2/2.6.3 and intercom-client versions published on or after April 29, 2026 in your private registry's allow-list.
  2. Disable lifecycle scripts in CI. Run npm ci --ignore-scripts in build pipelines and quarantine packages that require preinstall hooks for review.
  3. Rotate developer secrets. Any laptop, build runner or container that pulled the affected versions in the last seven days must have its npm tokens, GitHub PATs, AWS keys, GCP service accounts and SSH keys rotated immediately.
  4. Hunt for the IOCs. Search GitHub for new public repositories created under your engineers' accounts in the last 10 days, and inspect outbound DNS for the exfiltration domains published by Socket and GitGuardian.
  5. Stand up an SBOM program. SAMA examiners increasingly ask for a Software Bill of Materials for critical applications. Tools like Syft, Dependency-Track and GitHub's dependency graph make this a sprint-sized project, not a year-long one.
  6. Map controls to the framework. Update your control matrix to show how SBOM, signed commits, and registry proxying satisfy SAMA CSF 3.3.14 and NCA ECC 2-10 — this is what auditors will ask for at the next assessment.

Conclusion

Mini Shai-Hulud is a preview, not an outlier. Worming behavior in package registries is now a recurring tactic — npm alone has seen four self-propagating campaigns in the last six months — and the financial sector is squarely in the blast radius because so much of modern banking software ships through these ecosystems. Treating open-source dependencies as trusted by default is no longer compatible with SAMA CSF, NCA ECC or PCI DSS expectations.

Is your organization prepared? Contact Fyntralink for a complimentary SAMA Cyber Maturity Assessment focused on software supply chain controls, SBOM readiness and DevSecOps governance.