- Ruby released versions 4.0.9, 3.4.12 and 3.3.13 to fix several Onigmo regular-expression engine bugs.
- GitLab found the bugs could be used for remote code execution on GitLab servers.
- The bugs are reached only when an application compiles a regular expression from a string that an attacker controls.
Ruby has released versions 4.0.9, 3.4.12 and 3.3.13 to fix bugs in its Onigmo regular-expression engine that GitLab found could be used for remote code execution on GitLab servers.
The bugs affect applications that compile regular expressions from strings controlled by an attacker. Applications that use only regular expressions written by their developers are not affected.
On this page
Alpine Linux investigated attempted exploit activity against its GitLab server
Alpine Linux found no evidence that the attack worked but could not rule it out, so it rebuilt the server from scratch and reset every account’s password.
The account sent crafted CI configurations to the server on 20 and 21 October, crashing GitLab worker processes eight times. In four of those crashes, Alpine said the attacker got partway through the exploit and failed at the next step.
The attacker also downloaded Alpine’s GitLab container image, which Alpine said “suggests they were tuning the exploit to our exact build.”
GitLab upgrades did not replace the standard Ruby runtime
Alpine Linux said its GitLab image used standard Ruby, so upgrading the server to GitLab 19.3.6 on 22 October did not fix the flaw. Servers using Alpine’s own Ruby also need Ruby 3.3.13, 3.4.12, 4.0.9 or later.
Alpine blocked the account on 23 October. The attacker returned on 25 and 26 October, but those attempts failed.
The first two GitLab flaws required a logged-in account
The Hacker News said the first two GitLab flaws were disclosed on September 23. Each required a logged-in account and was rated 9.9 out of 10.
Ruby recommends upgrading to 4.0.9, 3.4.12 or 3.3.13 or later. It said users who cannot upgrade should avoid compiling regular expressions from untrusted input.
Alpine Linux finished rebuilding its GitLab server with Ruby 3.3.13 or later and replaced GitLab’s secret keys after investigating attempted exploit activity.
What to do now
- Upgrade to Ruby 4.0.9, 3.4.12 or 3.3.13 or later.
- If you cannot upgrade, avoid compiling regular expressions from untrusted input.
FAQ
What did Ruby release to fix the GitLab-related flaws?
Ruby released versions 4.0.9, 3.4.12 and 3.3.13 to fix several bugs in the Onigmo regular-expression engine.
Who is affected by the Ruby Onigmo bugs?
The bugs affect applications that compile regular expressions from strings controlled by an attacker. Applications using only developer-written regular expressions are not affected.
Can the Ruby bugs enable remote code execution?
Ruby said GitLab found the bugs could be used for remote code execution on GitLab servers.
Does Regexp.timeout protect against these bugs?
No. Ruby said Regexp.timeout does not protect against these bugs.
How do I fix the Ruby Onigmo vulnerabilities?
Ruby recommends upgrading to 4.0.9, 3.4.12 or 3.3.13 or later. If upgrading is not possible, it recommends avoiding compilation of regular expressions from untrusted input.
Was a GitLab server targeted during the incident?
Alpine Linux said an account sent crafted CI configurations that crashed GitLab worker processes eight times. It found no evidence that the attack worked but could not rule it out.
Sources
How we checked this story
| Claim | Source | Status |
|---|---|---|
| Ruby released versions 4.0.9, 3.4.12 and 3.3.13 to fix several Onigmo regular-expression engine bugs. | Ruby | Confirmed |
| Ruby said GitLab found the bugs could be used for remote code execution on GitLab servers. | Ruby | Confirmed |
| The bugs affect applications that compile regular expressions from attacker-controlled strings. | Ruby | Confirmed |
| Applications using only developer-written regular expressions are not affected. | Ruby | Confirmed |
| Ruby 4.0.9, 3.4.12 and 3.3.13 contain all four fixes. | Ruby | Confirmed |
| Alpine found no evidence that the attack worked but could not rule it out, so it rebuilt the server and reset every account password. | Alpine Linux, via The Hacker News | Attributed |
| Alpine’s GitLab image used standard Ruby, so upgrading to GitLab 19.3.6 on 22 October did not fix the flaw. | Alpine Linux, via The Hacker News | Attributed |
| Alpine Linux said servers using their own Ruby also need Ruby 3.3.13, 3.4.12, 4.0.9 or later. | Alpine Linux, via The Hacker News | Attributed |
| Alpine Linux said the attacker sent crafted CI configurations on 20 and 21 October, crashing GitLab worker processes eight times. | Alpine Linux, via The Hacker News | Attributed |
| Alpine Linux said in four crashes, the attacker got partway through the exploit and failed at the next step. | Alpine Linux, via The Hacker News | Attributed |
| The attacker downloaded Alpine’s GitLab container image, which Alpine said suggested exploit tuning for its exact build. | Alpine Linux, via The Hacker News | Attributed |
| Alpine blocked the account on 23 October, and subsequent attempts on 25 and 26 October failed. | Alpine Linux, via The Hacker News | Attributed |
| Alpine finished rebuilding the server on 28 October and ran it with Ruby 3.3.13 or later. | Alpine Linux, via The Hacker News | Attributed |
| Ruby’s Regexp.timeout setting does not protect against these bugs. | Ruby | Confirmed |
| GitLab is a software forge developed primarily by GitLab Inc. | Wikipedia | Confirmed |
| The Hacker News said the first two GitLab flaws were disclosed on September 23, each required a logged-in account and was rated 9.9 out of 10. | The Hacker News | Attributed |
Could not verify
- Whether the attacker achieved code execution is not established.
- Whether any Alpine user data was accessed is not established.
- How many GitLab servers are affected is not established.



