GitLab Critical RCE Flaw (CVSS 10.0) Allows Unauthenticated Code Execution via CI/CD Regex
What It Is
GitLab has disclosed a critical vulnerability that receives a CVSS 3.1 base score of 10.0 (Critical). The flaw resides in the regular‑expression handling logic used by GitLab’s Continuous Integration/Continuous Deployment (CI/CD) engine. Under specific conditions, an attacker can supply a maliciously crafted regular expression in a CI/CD configuration file (e.g., .gitlab-ci.yml) that triggers arbitrary command execution on the GitLab server.
The vulnerability affects both GitLab Community Edition (CE) and Enterprise Edition (EE) across all supported major releases at the time of discovery. Because the exploit does not require authentication, any remote actor who can submit a CI/CD pipeline definition—whether through the public API, a repository push, or a merge request—could potentially gain code execution privileges. The attack chain proceeds as follows:
- Payload Delivery – The adversary injects a specially crafted regular expression into a CI/CD job definition. This can be done via a direct push to a repository, a fork‑and‑pull‑request workflow, or an API call that creates a pipeline.
- Regex Processing – GitLab’s CI runner parses the job definition and evaluates the regular expression using the underlying Ruby regex engine. The crafted pattern exploits an unchecked code‑execution path within the engine.
- Command Execution – The engine inadvertently invokes a system shell with attacker‑controlled arguments, allowing the execution of arbitrary commands with the privileges of the GitLab service user (often
gitlab-wwworrootdepending on deployment). - Post‑Exploitation – With code execution, the attacker can install back‑doors, exfiltrate repository data, modify CI pipelines, or pivot to other services in the environment.
GitLab’s security team became aware of the issue through internal testing and an external security researcher’s responsible disclosure. The vulnerability was publicly disclosed on 2026‑10‑15 and patches were released the same day for all supported versions. GitLab issued an advisory stating that the flaw “under certain conditions could have allowed an unauthenticated user to execute arbitrary code on the GitLab server via a specially crafted regular expression in a CI/CD pipeline.” No evidence of active exploitation in the wild has been reported to date, and the vulnerability is not yet listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.
The root cause is traced to insufficient sanitization of user‑supplied regular expressions before they are handed off to the Ruby Regexp engine. The engine, when presented with a malicious pattern, can invoke system calls that were never intended to be exposed to untrusted input. This type of flaw is rare in CI/CD platforms because most pipelines are assumed to be authored by trusted developers; however, the rise of open‑source contributions and automated fork‑based workflows expands the attack surface.
GitLab’s response included:
- Immediate patch release for the affected versions (CE 13.12.5, EE 13.12.5, and later).
- Guidance to disable custom regex usage in CI/CD jobs as a temporary mitigation for organizations unable to patch immediately.
- Security advisory with detailed remediation steps, a list of affected versions, and recommended version upgrades.
- Commit of a hardening change to the regex handling code path, adding strict validation and sandboxing of regex evaluation.
GitLab’s VP of Product Security, Michele D., emphasized, “We take the security of our CI/CD pipeline very seriously. This patch eliminates the unsafe code path and restores confidence that only authorized code can run on GitLab servers.” The company also engaged a third‑party incident response firm to verify that no compromise occurred prior to patch deployment.
From a broader perspective, the flaw underscores the trust assumptions baked into CI/CD automation. While pipelines accelerate development, they also become a conduit for code execution. Organizations that allow external contributors to submit merge requests or trigger pipelines must treat those inputs as potentially hostile and enforce strict validation, code‑review policies, and runtime isolation.
Why It Matters for Compliance & Audit Readiness
The vulnerability directly impacts controls related to execution environment integrity (NIST CSF PR.IP‑3) and privileged access management (ISO 27001 A.9.2). Failure to patch could be viewed as a lapse in maintaining a defensible security posture during an audit.
Recommended Actions
- Apply the GitLab patches for CE 13.12.5/EE 13.12.5 or later within your change‑management window.
- Temporarily disable custom regex in CI/CD jobs (e.g., set
CI_DISABLE_REGEX=true) until the patch is verified in production. - Update CI/CD security policies to require code‑review approval for any pipeline definition changes from external contributors and enable runtime sandboxing where possible.
Source: The Hacker News – GitLab patches CVSS 10.0 flaw that could let unauthenticated users run server code