www.rapid7.com 16 Oct 2026, 13:31 UTC

GitLab fixes critical CI/CD flaw enabling unauthenticated remote code execution

CyberSIXT Evidence Panel Source marked as original reporting
CISA KEV Not in KEV
Patch Patch Status Unknown

RAPID 7 has analysed a critical vulnerability in GitLab CI/CD handling of regular expressions, CVE-2026-97229. The flaw stems from an integer overflow in the CI/CD regex compiler that can be triggered via attacker-controlled configurations and a specially crafted path name. GitLab released patches for affected versions on 12 October 2026: 19.4.2, 19.3.5 and 19.2.8, with GitLab describing a potential for code execution by an unauthenticated user.

The advisory states that GitLab CE and EE are affected for 19.2 before 19.2.8, 19.3 before 19.3.5 and 19.4 before 19.4.2; GitLab[.]com was patched prior to disclosure, and Dedicated customers did not need to act. Rapid7’s end-to-end PoC demonstrated commands executed as the GitLab git OS account on the official linux/amd64 gitlab-ce:19.4.1-ce.0 image with ASLR enabled.

The report notes no active exploitation in the wild at disclosure, though the PoC shows a reliable path to remote code execution via the static CI lint route.

Technically, the attack traverses from attacker-supplied repository input through Onigmo pcode to native code execution. GitLab’s rules such as exists:regexp and changes:regexp feed repository paths into a Ruby-Onigmo pipeline; the scanner first validates source length, then compiles the pattern, and finally tests against repository paths in the worktree.

The PoC relies on bypassing the scanner’s repeat-bound checks with a crafted quantifier and exploiting how Ruby recompiles the regex for UTF-8 subject encodings, creating a large, malicious pcode that can run attacker-supplied instructions via the libruby pointer and Onigmo’s VM. Rapid7 provides a PoC and details extraction, along with fixes: GitLab’s backport changes replace a multiplication-based overflow test with a division-based one, and patches reject compiled programs above roughly 512 MB.

Detection guidance calls for correlating anomalous lint GET requests (HTTP 502 or EOF), accompanying Puma worker crashes, and specific CI lint content references in public branches. Mitigation focuses on upgrading to 19.2.8, 19.3.5 or 19.4.2, and, as a temporary measure, restricting unauthenticated access to the lint endpoint.

View full article

Article by CyberSIXT

Timeline Coverage

Swipe to explore timeline