>samit_hota
Back to security news

Security News · SN-2026-606

CRITICALCVE-2026-97229MITIGATED

Alpine Linux Rebuilds Infrastructure After Exploitation of GitLab RCE Flaw

Affected: Alpine Linux · GitLab · alpinelinux/gitlab

Samit Hota·
#news#vulnerability-disclosure#alpine

Alpine Linux rebuilt its core GitLab infrastructure from scratch and issued forced password resets across its community after discovering active exploitation attempts against its self-hosted developer portal. Threat actors attempted to exploit CVE-2026-97229, a maximum-severity remote code execution vulnerability in GitLab, targeting Alpine’s development environment between October 20 and October 21. While forensic analysis revealed no evidence of code tampering or package compromises, missing transaction logs and incomplete outbound traffic records made it impossible to definitively rule out post-exploitation access, prompting project maintainers to decommission and rebuild the environment.

The incident highlights the acute supply chain risks facing core open-source infrastructure. As the primary base operating system for millions of production Docker containers globally, any integrity failure within Alpine’s build platform could trigger catastrophic downstream compromises across the enterprise container ecosystem.

Anatomy of the CVE-2026-97229 Vulnerability

CVE-2026-97229 is a maximum-severity (CVSS 10.0) integer overflow vulnerability residing in Onigmo, the regular expression engine bundled with Ruby and utilized by GitLab’s CI/CD pipeline parser. Integer overflow vulnerabilities in regular expression compilers occur when the engine evaluates complex pattern quantifiers or excessive string lengths, leading to incorrect memory allocation sizing calculations. When the buffer size calculation wraps around to a small integer, subsequent operations perform heap out-of-bounds writes, allowing unauthenticated remote attackers to achieve arbitrary code execution within the context of the underlying worker process.

GitLab originally disclosed the flaw and issued patches on October 12, warning that attackers could trigger code execution by submitting crafted regular expressions within CI/CD pipeline configurations. Because CI/CD engines automatically ingest and process incoming repository configurations—such as .gitlab-ci.yml files submitted via pull requests or commit pushes—the vulnerability offers an unauthenticated, zero-click attack surface on exposed instances.

The Custom Image Maintenance Trap

The attack against Alpine Linux succeeded in reaching vulnerable code due to a subtle divergence between official vendor packages and custom container maintenance workflows.

Alpine maintained its own custom container image for its infrastructure (alpinelinux/gitlab). When GitLab released safety patches in version 19.3.5, Alpine initially remained on version 19.3.4 before upgrading to version 19.3.6. However, because GitLab’s official distribution bundles its own pre-patched Ruby environment, updating the GitLab application layer alone in Alpine’s custom container image was insufficient. The core flaw resided inside Onigmo within the system Ruby runtime. Because Alpine’s custom image relied on an unpatched system Ruby build rather than the upstream vendor’s bundled dependencies, the underlying integer overflow remained fully exploitable despite running GitLab 19.3.6.

On October 20 and 21, the threat actor submitted malicious CI configurations designed to trigger the Onigmo heap overflow. These attempts triggered eight distinct GitLab worker crashes. Four of the crash events demonstrated partial exploitation characteristics, indicating the attacker was actively tuning their payload to stabilize arbitrary code execution on the target architecture.

During the incident response investigation, maintainers discovered that the attacker had also downloaded Alpine’s custom GitLab container image prior to launching the payload. Acquiring the exact target container image allows attackers to replicate the target environment locally, inspect memory offsets, and refine stack-pivoting or ROP-chain techniques to ensure reliable remote execution without crashing the target process repeatedly.

Supply Chain Blast Radius and Incident Response

The blast radius of a successful compromise on Alpine Linux’s GitLab server is severe. The instance hosts the project’s source repositories, code review workflows, internal continuous integration jobs, and critically, the aports build recipes. These build recipes govern how software packages are compiled and assembled into the official Alpine Linux distribution.

If an attacker gains code execution on the GitLab server, the potential impact includes:

  • Repository and Package Tampering: Injecting malicious code directly into repository commits or altering build recipes to insert backdoors into compiled binary packages (.apk).
  • Credential Harvesting: Exposing developer user details, password hashes, two-factor authentication secrets, private repository content, integration tokens, and CI/CD pipeline secrets.
  • Downstream Container Infection: Pushing compromised base images to public registries, which would instantly propagate backdoors into enterprise application stacks, cloud microservices, and Kubernetes clusters reliant on Alpine base layers.

Forensic analysis conducted through October 27 confirmed that no signing keys were compromised, as cryptographic release keys are physically isolated from the GitLab server. Furthermore, deep diff inspections of repository commits, binary packages, and OS releases up to October 27 revealed no code modifications or injected artifacts.

However, because the attack triggered process crashes that corrupted local memory states and full outbound network connection logs were unavailable, the Alpine engineering team could not conclusively confirm that no temporary reverse shell was established. Choosing complete operational integrity over rapid recovery, the team wiped the environment, rebuilt the GitLab instance from bare metal, invalidated all infrastructure secrets, and forced a global password reset for all project contributors.

Remediation Requirements

Organizations running self-hosted GitLab instances or custom container deployments must immediately verify their underlying Ruby component updates.

  1. Deploy Patched Container Images: System administrators relying on Alpine’s custom GitLab image must immediately pull the updated alpinelinux/gitlab:19.3.6 container image published on October 27. This specific build updates the underlying system runtime to Ruby 3.3.13, resolving the Onigmo vulnerability (CVE-2026-97229).
  2. Rotate Self-Hosted Credentials: Any organization that exposed unpatched GitLab instances (versions prior to 19.3.5, or custom images lacking Ruby 3.3.13) to untrusted networks between October 12 and October 27 should treat internal secrets as potentially exposed. Revoke and rotate all CI/CD pipeline variables, personal access tokens, runner registration tokens, and integration webhooks associated with the instance.

Found something similar in your stack?

Let's find out before it becomes an incident.

Book an advisory call