Ruby released security updates on October 23, 2026, fixing three memory-safety bugs in its Onigmo regular expression engine. The updates address underlying defects associated with four GitLab security vulnerabilities, including flaws that could allow remote code execution under specific conditions.
The Ruby regex security fixes are available in versions 4.0.9, 3.4.12 and 3.3.13. Their significance extends beyond GitLab: any application that compiles attacker-controlled regular expressions using the affected Ruby engine may need attention. Applications using only developer-defined patterns are not exposed through the conditions described in Ruby’s advisory.
Ruby 4.0.9, 3.4.12 and 3.3.13 contain all three Onigmo fixes. Ruby 4.0.8 does not include the complete set. Administrators should assess whether applications or dependencies compile regular expressions controlled by external users.
Three Ruby Engine Bugs Behind Four GitLab CVEs
According to the official Ruby security announcement, the problems involve memory corruption during regular expression compilation.
One defect is a double-free condition that can occur when parsing fails after an alternation. Another involves an integer overflow when calculating the size of a compiled pattern. The third affects internal identifiers in patterns containing numerous repetitions.
GitLab associated these underlying problems with four identifiers: CVE-2026-89078, CVE-2026-93577, CVE-2026-97229 and CVE-2026-110264. Two of the GitLab CVEs correspond to the same underlying compiled-pattern size overflow, leaving three Ruby engine bugs behind four vulnerability identifiers.
GitLab had already addressed the issues in its own software releases by patching the Ruby runtime it distributes. Its latest relevant critical security release was published on October 21, two days before the upstream Ruby announcement.
Ruby Regex Security Fixes: Which Versions Are Complete?
The three Ruby release branches did not receive the underlying fixes at the same time. The October 23 releases provide a common patched baseline for the affected Onigmo implementations.
| Ruby Branch | First Release With All Fixes | Important Detail |
|---|---|---|
| 4.0 | 4.0.9 | 4.0.8 contains only part of the complete fix set. |
| 3.4 | 3.4.12 | Contains all three underlying corrections. |
| 3.3 | 3.3.13 | Receives the fixes during its security-maintenance phase. |
The version distinction is particularly important for Ruby 4.0 users. The earlier 4.0.8 release fixed the compiled-pattern size overflow, but the separate internal-ID overflow was not corrected until 4.0.9.
Ruby 3.3.13 also received the corrections despite that branch being in security maintenance. The Ruby team described the release as an exception because GitLab had assigned CVEs to issues that depend on these bugs.
Which Ruby Applications Are Actually Exposed?
The relevant condition is not simply whether a server runs Ruby. The application must compile a regular expression whose structure an attacker can control.
Potentially affected code paths include calls to Regexp.new, Regexp.compile or Regexp.union using untrusted strings. Interpolating external input into a regular expression literal can create the same class of exposure.
This distinction matters for application frameworks, developer tools and custom web services. A Ruby application is not automatically exploitable merely because it uses regular expressions. Its input-handling behavior determines whether the vulnerable compilation paths are reachable.
The Ruby team also cautions that Regexp.timeout does not prevent these memory-safety issues. Limiting the length of regular expressions is not a reliable defense either, because some problematic patterns can be short.
Why GitLab Patches and Ruby Updates Are Separate
GitLab patched the version of Ruby bundled with its own application. That means a self-managed GitLab deployment should follow GitLab’s security release and upgrade guidance rather than assume that updating the host operating system’s Ruby package will remediate GitLab itself.
Conversely, the October 23 Ruby updates address the underlying engine defects for other applications that use the affected runtime. Patching GitLab alone does not update independent Ruby applications running elsewhere on the same infrastructure.
The distinction is important for administrators managing multiple services, containers and runtime installations. An inventory may reveal different Ruby versions across production applications, background workers and deployment environments.
Servers.News previously covered GitLab’s separate September vulnerability, CVE-2026-85706, which involved unauthorized file access and confirmed exploitation. That incident is distinct from the Onigmo vulnerabilities discussed here.
What Server Operators Should Do Now
Administrators responsible for Ruby-based infrastructure should prioritize the following checks:
- Identify affected runtimes. Inventory Ruby installations used by production applications, containers, workers and build environments. Check the actual application runtime rather than relying exclusively on the system-default interpreter.
- Review pattern compilation. Identify code and dependencies that pass externally controlled strings to regular expression constructors.
- Apply the corrected releases. Upgrade affected upstream Ruby installations to 4.0.9, 3.4.12 or 3.3.13, or a later release containing the fixes. For distribution-managed packages, verify the vendor’s actual patch status.
- Remove unsafe input paths. If immediate updates are impossible, prevent untrusted users from controlling compiled regex patterns. Do not rely on timeout settings or pattern-length limits alone.
- Verify deployments. After updating, confirm that application processes and container images use the corrected runtime and that compatibility tests pass.
What Remains Unknown?
Ruby’s announcement does not quantify the number of third-party applications exposed through these code paths. It also does not establish that the GitLab exploitation scenarios apply unchanged to other Ruby applications.
The Ruby project has not requested separate Ruby-specific CVE identifiers for the underlying corrections. It says it will consider how to classify and document this category of issue and will update its announcement if new identifiers are assigned.
For infrastructure teams, the immediate operational conclusion is to verify both the runtime version and the application’s treatment of untrusted regular expressions. The availability of patched Ruby releases resolves the known engine defects, but understanding exposure still requires application-specific review.
Reporting basis: Ruby’s security announcement of October 23, 2026; GitLab’s October 21 patch release; and Ruby Weekly’s independent analysis. Technical exposure depends on application behavior and deployment configuration.







