By NHI Mgmt Group Editorial TeamBased on Apono: “Shai‑Hulud worm and the Nx / S1ngularity attacks: How-to use JIT Access to Stop the Chain Reaction” (September 19, 2025)

TL;DR: Shai-Hulud and the Nx S1ngularity attacks showed how token theft, vulnerable GitHub Actions workflows, and always-on elevated permissions can combine into cascading compromise across repositories and organisations, according to Apono. The deeper issue is that access review and least-privilege controls fail when elevated access is inherited, static, and available long enough to be abused.


At a glance

What this is: This analysis examines how Shai-Hulud and the Nx/S1ngularity attacks used stolen tokens and vulnerable workflows to amplify GitHub privilege exposure.

Why it matters: It matters because IAM teams need to govern repository, organisation, and inherited team access as time-bounded privilege, not as always-available capability.


Context

GitHub standing privilege becomes a security problem when elevated access, inherited permissions, and workflow automation remain available long enough for attackers to reuse them. In this case, the issue is not only token theft, but the fact that the stolen access could still perform high-impact actions across repositories and organisations.

The article links two attack patterns to the same governance gap: Shai-Hulud used compromised package maintainer accounts and malicious postinstall behaviour to spread, while Nx/S1ngularity abused vulnerable GitHub Actions workflows to extract secrets and broaden access. Both show that static permissions and weak lifecycle control create an execution window that adversaries can repeatedly exploit.


Key questions

Q: What breaks when GitHub owner and admin access is left standing during a compromise?

A: Standing owner and admin access turns a single stolen token into a broad execution path. Attackers can create workflows, publish malicious packages, expose secrets, and change repository visibility before anyone completes a review cycle. The control failure is not just excessive access, but access that remains actionable long enough to be abused.

Q: Why do inherited team permissions increase the impact of compromised GitHub credentials?

A: Inherited permissions let one account influence many repositories through team membership or role inheritance. If the account is compromised, the attacker does not need to escalate separately for each asset. That creates a multiplier effect, where one identity failure becomes a multi-repository incident.

Q: How should security teams reduce the blast radius of malicious GitHub Actions when workflows process untrusted pull request inputs?

A: Security teams should assume workflow inputs can be attacker controlled and restrict both network egress and runtime behavior in CI/CD jobs. The safest pattern is least privilege, explicit allowlists for outbound destinations, and monitoring for unexpected execution. That combination limits credential theft, command injection impact, and tampering with build outputs when an action is compromised.

Q: When should organisations move GitHub privileges from standing access to JIT access?

A: They should do it for any role that can alter trust boundaries, including repository admin, organisation owner, release publishing, and team-level access that fans out across multiple projects. If a role can expose secrets or change visibility, it should not remain permanently available.


Technical breakdown

How token theft becomes a propagation path in GitHub

These attacks work because a stolen GitHub, cloud, or package token often inherits far more capability than the immediate task requires. Once an attacker can use that token inside repositories, actions, or package publishing flows, they can trigger automation, exfiltrate secrets, and in some cases create new public repositories to stage stolen data. The result is not a single compromised identity, but a chain reaction where one credential enables the next abuse step. Practical implication: treat every high-scope token as a potential propagation mechanism, not just an authentication artefact.

Practical implication: reduce the scope and lifetime of any token that can trigger repository, workflow, or publishing actions.

Why GitHub Actions and inherited permissions amplify blast radius

GitHub Actions is powerful because it can automate trusted build and release steps, but that same automation becomes dangerous when workflows are vulnerable or when elevated access is inherited through owner, admin, or team membership. In those cases, a single compromised account can create workflows, publish malicious packages, or make private resources public without needing a separate escalation path. Inherited permissions are especially risky because one identity can fan out into many repositories. Practical implication: separate workflow execution rights from administrative rights and treat inherited access as high-risk privilege.

Practical implication: isolate workflow permissions from admin rights and review inherited access as a separate privilege class.

How JIT access changes the control model for standing privilege

Just-in-time access changes GitHub governance from durable permission to temporary authorisation. Instead of leaving repository write, organisation owner, or team-admin capability continuously available, the permission is requested, approved, scoped, and automatically withdrawn after the task completes. That matters because worm-style attacks and secret abuse rely on unattended elevation and prolonged access windows. JIT does not stop initial compromise, but it removes the persistence that makes compromise scalable. Practical implication: move high-risk GitHub roles from standing access to short-lived, auditable elevation.

Practical implication: move repository admin, owner, and team-level elevation into short-lived request-based workflows.


Threat narrative

Attacker objective: The attacker aims to convert one compromised developer or workflow identity into repeatable access across repositories, secrets, and package distribution paths.

  1. Entry via malicious npm package or vulnerable GitHub Actions workflow gave the attacker a foothold inside trusted development and release processes.
  2. Credential access followed when tokens and secrets were stolen from compromised accounts or workflow contexts, including cloud and GitHub credentials.
  3. Escalation occurred through owner, admin, or inherited team permissions that allowed workflow creation, publishing, and visibility changes across repositories.
  4. Impact came from cascading compromise: malware spread across packages, secrets were exfiltrated, and private repositories could be exposed or republished publicly.

Read our 52 NHI Breaches Analysis report for a comprehensive view of breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

Standing privilege is the failure mode that makes GitHub compromise scalable. The article shows that the real issue is not token theft alone, but token theft paired with access that remains usable long enough to create, publish, and propagate malicious changes. When owner, admin, and inherited team rights are always on, one compromise becomes a platform-wide event. Practitioners should stop treating GitHub elevation as a convenience layer and start treating it as a bounded privilege state.

Inherited permissions collapse the assumption that privilege is local to one user or one repository. This article shows that a compromised maintainer can act across many packages, workflows, and repos because team-based and owner-based authority fans out by design. The implication is that governance has to account for privilege multiplication, not just privilege assignment. IAM teams should map where one identity can indirectly influence many assets through inheritance.

Just-in-time access is the right control because it narrows the abuse window, not because it is a generic least-privilege slogan. GitHub Actions, repo admin, and organisation owner rights are materially different from ordinary developer access because they can alter trust boundaries, not just consume them. Time-bound elevation reduces the period in which stolen credentials remain useful. For practitioners, the decision is whether those roles are still justified as standing access at all.

GitHub workflow security and identity governance are now the same control problem. A vulnerable workflow becomes a privilege pathway when it can reach secrets, publish artefacts, or change repository visibility. That means PAM, IAM, and CI/CD controls cannot be separated cleanly in incident planning or access design. Security teams should review workflow-triggered access as part of their identity governance model, not as a build-system side issue.

Ephemeral credential trust debt: this attack pattern shows how organisations accumulate risk when temporary-looking credentials are granted with permanent effect. Once a token can create new trust objects, publish packages, or expose repositories, the credential outlives the task it was meant to support. Practitioners should treat GitHub elevation, workflow permissions, and inherited rights as a single governance domain with shared blast radius.

What this signals

Repository governance now has to assume that workflow logic and identity privilege are linked. If a workflow can reach secrets or publish artefacts, it is part of the access model, not merely part of delivery automation. That means review gates, expiry, and approval logic need to sit closer to issuance time than to audit time.

GitHub standing privilege creates a governance lag that attackers can exploit faster than humans can certify. The practical shift is from periodic review to immediate control over who can activate sensitive roles, especially where inherited permissions and automation widen the blast radius. For identity programmes, this is a strong case for treating ephemeral elevation as the default for high-risk GitHub operations.


For practitioners

  • Implement just-in-time elevation for high-risk GitHub roles Move repository write, organisation owner, and team-admin permissions to request-based access with automatic expiry after the approved task completes.
  • Separate workflow execution from administrative authority Review GitHub Actions so that build and release automation cannot create workflows, change visibility, or inherit admin-equivalent permissions without explicit approval.
  • Tighten inherited team permissions Inventory teams that can affect many repositories at once, then remove standing owner or admin rights wherever a temporary assignment would work instead.
  • Monitor for anomalous repository and workflow changes Alert on new public repositories, unexpected workflow creation, secret publication, and permission changes by accounts that normally do not perform those actions.

Key takeaways

  • Shai-Hulud and Nx/S1ngularity show that GitHub compromise becomes far more dangerous when stolen tokens can still exercise standing privilege.
  • The incidents demonstrate a repeatable pattern: workflow abuse, inherited rights, and always-on elevation combine into cross-repository blast radius.
  • Time-bounded access and tighter workflow governance are the controls that most directly reduce the abuse window in GitHub environments.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 and MITRE ATT&CK address the attack and risk surface, while NIST SP 800-53 Rev 5 sets the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-05 — Overprivileged NHIStanding GitHub owner, admin, and team permissions are the central overprivilege problem in this article.
NHI-07 — Long-Lived SecretsThe attacks succeed because tokens and elevated access remain usable long enough to be abused.
NHI-01 — Improper OffboardingCompromised or stale access that is never revoked lets attacker activity continue after the original trust event.
Recommendation — Reclassify GitHub admin-equivalent rights as overprivileged and move them to time-bound elevation. Reduce long-lived GitHub tokens and replace standing elevation with short-lived credentials. Revoke dormant GitHub roles and inherited access paths as soon as they are no longer required.
NIST SP 800-53 Rev 5IA-5 — Authenticator ManagementToken theft and standing credentials make authenticator lifecycle management directly relevant.
Recommendation — Apply IA-5 to enforce expiry, rotation, and revocation for GitHub authenticators.
MITRE ATT&CKTA0006;TA0008 — Credential Access; Lateral MovementThe article describes secret theft followed by propagation across repositories and organisations.
Recommendation — Map the attack chain to credential access and lateral movement to prioritise detections.

Key terms

  • Standing Privilege: Standing privilege is access that remains active even when no immediate task requires it. For NHI programmes, it is a common failure mode because long-lived credentials and persistent roles create unnecessary exposure. Reducing standing privilege usually means tighter expiry, on-demand access, and clearer review of who or what still needs access.
  • Inherited Permissions: Inherited permissions are access rights passed from the authorizing user or application to a connected integration. They become risky when the granted scope is broader than the integration needs, because the downstream app can retain high privilege long after the original business need has changed.
  • Just-in-Time Access Request: Just-in-Time Access Request is a pattern that grants access only when it is needed and only for the duration required. It reduces standing privilege by making access temporary, policy driven, and task scoped. This approach is especially useful for contractors, sensitive systems, and short-lived operational work.
  • Workflow Abuse: Workflow abuse is the use of legitimate business processes such as onboarding, support, or approval chains to gain access that would be harder to obtain through a direct technical exploit. It succeeds when process trust is stronger than identity verification.

Deepen your knowledge

NHI governance, identity lifecycle, and secrets management are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are building or maturing an IAM programme, it is worth exploring.
NHIMG Editorial Note
Published by the NHIMG editorial team on June 24, 2026.
Updated on October 6, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org