Cyber Security News

Threat Actors Exploit CI/CD Environments to Gain Unauthorized Access to Restricted Resources

Recent research by Unit 42 highlights critical vulnerabilities in the use of OpenID Connect (OIDC) within continuous integration and continuous deployment (CI/CD) environments.

OIDC, an extension of the OAuth protocol, is widely adopted for secure authentication and authorization, playing a central role in modern CI/CD workflows.

However, misconfigurations and flawed implementations of OIDC have emerged as exploitable avenues for threat actors to gain unauthorized access to sensitive resources.

OIDC enables passwordless authentication by issuing identity tokens that verify user identities and authorize access to resources.

While this approach streamlines security in CI/CD systems, Unit 42 identified several vulnerabilities associated with the protocol, including overly permissive identity federation policies, reliance on user-controllable claim values, and risks associated with misconfigured pipelines.

These vulnerabilities enable attackers to exploit poisoned pipeline execution (PPE) or manipulate claims to access restricted resources.

 CI/CD Environments CI/CD Environments
Flow of a CI machine accessing a cloud resource.

Critical Threat Vectors Identified

Unit 42’s analysis revealed three primary pathways for exploiting OIDC in CI/CD environments:

  1. Loosely Configured Identity Policies: Many organizations fail to enforce meaningful validation of OIDC claims, creating security blind spots. For example, permissive policies may accept any audience (aud) claim value or validate claims that are universally true in a given context. Such configurations fail to differentiate legitimate users from threat actors who manipulate token claims.
  2. User-Controllable Claims: OIDC tokens often include claims derived from user-controlled inputs—such as branch names, workflow details, or environment variables. Threat actors can exploit these claims to escalate privileges, mimicking authorized identities and gaining access to sensitive resources.
  3. Poisoned Pipeline Execution (PPE): Attackers can leverage remote code execution (RCE) vulnerabilities within CI/CD pipelines to manipulate OIDC tokens. A combination of lax identity federation policies and PPE opens the door to unauthorized access across interconnected repositories and production systems.

Misconfigurations in vendor-side credential handling further exacerbate these risks.

For instance, flaws in CircleCI’s OIDC implementation allowed identity tokens from fork workflows to access protected resources a vulnerability that was only resolved after its discovery by researchers.

Real-World Implications and Case Studies

The vulnerabilities highlighted by Unit 42 demonstrate the severe consequences of OIDC misconfigurations in CI/CD environments.

The GitHub OIDC utils repository, listing the custom claims.

A particularly concerning scenario involves organizations with overly broad federation policies. For example:

  • Repository A may have a vulnerable CI/CD pipeline exposed to PPE, granting attackers access to its OIDC tokens.
  • Repository B, a production repository managing sensitive resources, relies on a permissive federation pattern (e.g., repo:my_org/*), allowing any repository in the organization to meet federation requirements.

A threat actor exploiting Repository A’s vulnerability can use its OIDC tokens to impersonate Repository B’s identity and access cloud resources.

This scenario underscores the need for granular identity federation policies and stricter claim validation.

Organizations adopting OIDC in CI/CD workflows should take proactive measures to address potential security risks.

Unit 42 recommends the following best practices:

  • Strengthen Federation Policies: Replace broad organization-wide patterns with repository-specific rules to minimize exposure to unauthorized access.
  • Strict Validation of Claims: Avoid relying on claims derived from user-controlled inputs for critical security decisions.
  • Custom Claim Format Audits: Regularly assess custom claims for vulnerabilities, particularly in scenarios where attackers can manipulate the claim values.
  • Defensive Pipeline Security: Prevent PPE vulnerabilities through robust CI/CD security practices, ensuring that pipelines are protected from remote code execution exploits.

As vendors and cybersecurity organizations work to address these challenges, notable improvements have been made.

CircleCI has introduced default settings that restrict OIDC token generation in forked workflows, tightening security parameters for customer environments.

Additionally, Palo Alto Networks provides Infrastructure as Code (IaC) policies through Prisma Cloud, enabling automated detection and mitigation of misconfigured OIDC implementations.

The rising adoption of OIDC in CI/CD environments requires organizations to stay vigilant against evolving threat vectors.

Regular security audits, adherence to best practices, and coordination with cybersecurity vendors are crucial to safeguarding critical resources from exploitation.

For urgent security matters, teams should consult incident response experts, such as Unit 42, to ensure rapid mitigation of emerging threats.

Find this News Interesting! Follow us on Google NewsLinkedIn, & X to Get Instant Updates!

Aman Mishra

Aman Mishra is a Security and privacy Reporter covering various data breach, cyber crime, malware, & vulnerability.

Recent Posts

DragonForce and Anubis Ransomware Gangs Launch New Affiliate Programs

Secureworks Counter Threat Unit (CTU) researchers have uncovered innovative strategies deployed by the DragonForce and…

47 minutes ago

“Power Parasites” Phishing Campaign Targets Energy Firms and Major Brands

Silent Push Threat Analysts have uncovered a widespread phishing and scam operation dubbed "Power Parasites,"…

52 minutes ago

Threat Actors Register Over 26,000 Domains Imitating Brands to Deceive Users

Researchers from Unit 42 have uncovered a massive wave of SMS phishing, or "smishing," activity…

55 minutes ago

Russian Hackers Attempt to Sabotage Digital Control Systems of Dutch Public Service

The Dutch Defense Ministry has revealed that critical infrastructure, democratic processes, and North Sea installations…

1 hour ago

North Korean APT Hackers Pose as Companies to Spread Malware to Job Seekers

Silent Push Threat Analysts have uncovered a chilling new cyberattack campaign orchestrated by the North…

1 hour ago

North Korean Hackers Exploit GenAI to Land Remote Jobs Worldwide

A groundbreaking report from Okta Threat Intelligence reveals how operatives linked to the Democratic People’s…

1 hour ago