CVE/vulnerability

AWS Console Supply Chain Breach Enables GitHub Repository Hijacking

Wiz Research has uncovered CodeBreach, a critical vulnerability in AWS CodeBuild CI/CD pipelines that could have enabled the complete takeover of the AWS JavaScript SDK repository and potentially compromised the AWS Console itself.

The flaw placed 66% of cloud environments at risk through this widely-used library.

The vulnerability stemmed from an unanchored regex pattern in CodeBuild’s webhook filters. AWS repositories relied on ACTOR_ID filters to restrict builds to approved maintainers, but the regex lacked start (^) and end ($) anchors.

This allowed any GitHub user ID containing an approved maintainer’s ID as a substring to bypass the filter entirely.

Researchers discovered that GitHub assigns sequential numeric IDs to accounts. With roughly 200,000 new accounts created daily, any 6-7 digit maintainer ID would become available as a substring within a longer ID approximately every five days a window researchers termed an “eclipse.”

Attack Flow

The Exploitation

Wiz leveraged GitHub’s app manifest flow to automate creation of 200 bot accounts simultaneously, successfully capturing user ID 226755743 which contained a trusted maintainer’s ID for the aws-sdk-js-v3 repository.

By submitting a pull request with embedded malicious code, they triggered a build and extracted the repository’s GitHub credentials.

The compromised credentials belonged to aws-sdk-js-automation, a service account with full administrative access.

This access enabled direct commits to the main branch, pull request approval, and secret exfiltration.

The JavaScript SDK is released weekly and embedded in the AWS Console itself, affecting approximately two-thirds of all cloud environments.

A successful attack could have injected malicious code into the SDK before release, compromising downstream users at scale following the same pattern that recently infected Amazon Q users.

The vulnerability extended to at least three additional AWS repositories, including private mirrors and repositories associated with personal GitHub accounts belonging to AWS employees.

AWS has implemented global hardening measures within CodeBuild, including the new Pull Request Comment Approval build gate to prevent untrusted builds from triggering privileged pipelines.

Organizations should immediately enable this protection, use fine-grained Personal Access Tokens with minimal permissions, and ensure webhook filter regex patterns are properly anchored.

This incident exemplifies a troubling trend: attackers increasingly target CI/CD systems due to their complexity, access to untrusted data, and privileged credentials creating ideal conditions for high-impact supply chain attacks.

Follow us on Google News, LinkedIn, and X to Get Instant Updates and Set GBH as a Preferred Source in Google.

Divya

Divya is a Senior Journalist at GBhackers covering Cyber Attacks, Threats, Breaches, Vulnerabilities and other happenings in the cyber world.

Recent Posts

Hackers Use ConnectWise SkyKick Credentials to Access Microsoft 365, Halting Cloud Backups

Attackers abused compromised ConnectWise Cloud Backup credentials to access Microsoft 365 customer environments, prompting ConnectWise…

1 day ago

Anthropic’s Claude AI Uncovers Origins of NSA-Provided Cryptographic Keys After 25 Years

Anthropic says an internal Claude research model reconstructed how the National Security Agency generated seeds…

1 day ago

Critical WordPress Flaws Allow Attackers to Execute Remote Code Without Authentication

Two WordPress Core vulnerabilities can be chained to execute remote code without authentication, according to…

1 day ago

OpenBSD Kernel Flaw Dating Back 37 Years Enables Local Privilege Escalation to Root

A newly disclosed OpenBSD kernel exploitation chain combines a shared memory accounting flaw with a…

1 day ago

GhostAction Hackers Hide Credential-Stealing Malware in Fake Font Files Across 94 GitHub Repositories

GhostAction attackers have expanded their GitHub credential theft campaign with a second stage that disguises…

1 day ago

SideCopy Hackers Target Indian Organizations With ReverseRAT Malware to Steal Data

Indian authorities have warned that SideCopy hackers are targeting Indian organizations, including academic institutions, with…

1 day ago