published fresh until

Ruby 4.0.10 regexp fixes: how do I patch my app?

Summary As of November 2026, upgrade CRuby to 4.0.10, 3.4.13 or 3.3.14 within your current branch and restart deployed processes; until then, stop compiling attacker-controlled regexp patterns because timeouts do not protect the compiler (checked 2026-11-24).

Not for ordinary regexp matching-time catastrophic backtracking

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

As of November 2026, upgrade your current CRuby branch to 4.0.10, 3.4.13 or 3.3.14 (current Ruby advisory, checked 2026-11-24), then restart and verify the actual application runtime.

What changed

  • Ruby shipped these fixes on 2026-10-23 (checked 2026-10-28): 4.0.9 release, 3.4.12 release, 3.3.13 release. Each release page was fetched for this draft.
  • Ruby’s coordinated notice connects Onigmo compiler memory bugs to GitLab’s CVE-2026-89078, CVE-2026-93577, CVE-2026-97229 and CVE-2026-110264. They concern attacker-controlled PATTERNS, not merely untrusted text matched against developer-written expressions.

How to migrate

1. Run ruby -v and bundle exec ruby -v in the app’s actual execution environment, including CI and deployed containers. Check service launch paths and workers too. Trace whether untrusted input reaches Regexp.new, Regexp.compile, Regexp.union or regexp interpolation. This is a source review; finding one call alone does not prove exploitability. 2. Pick the matching branch target. As of November 2026, versions and dates below were checked 2026-11-24 against the 4.0.10, 3.4.13 and 3.3.14 release pages.

Existing branchTarget, checked 2026-11-24Released, checked 2026-11-24
4.04.0.102026-11-18
3.43.4.132026-11-18
3.33.3.142026-11-18

3. Use ONE existing deployment path. The examples below substitute the officially released target into documented version-manager syntax; they are proposed commands, not commands run for this draft.

rbenv — Ensure the installed ruby-build definitions include the target. The rbenv README documents install and local; install requires ruby-build. Example for 3.4.13 (checked 2026-11-24):

rbenv install -l
rbenv install 3.4.13
rbenv local 3.4.13
ruby -v

asdf — The Ruby plugin documents refreshing definitions; the current version guide uses asdf set to write the project selection. Example for 3.4.13 (checked 2026-11-24):

asdf plugin update ruby
asdf install ruby 3.4.13
asdf set ruby 3.4.13
asdf current ruby
ruby -v

Docker — Docker’s official Ruby image page lists ruby:4.0.10, ruby:3.4.13 and ruby:3.3.14 (checked 2026-11-24). Preserve your existing distribution/variant; for example it explicitly lists ruby:3.4.13-bookworm (checked 2026-11-24). Change the base image, resolve and pin its digest through your normal release pipeline, rebuild all image stages that carry Ruby, and redeploy. Editing a Dockerfile alone does not update running containers.

4. Reinstall the app’s locked bundle for the selected runtime and rebuild native extensions as needed. Align .ruby-version, .tool-versions, CI pins and container definitions that the project actually uses. Restart web processes and background workers; rerun the version checks inside the deployed environment. 5. If rollout must wait, disable untrusted pattern compilation, as Ruby’s notice recommends. For plain substring search, consider a literal string operation; review semantics before replacing regexps. GitLab appliances/bundled installations need their product-supported update path rather than a host Ruby swap.

What breaks

Diagnostic: too many range repeat

The upstream compiler-fix discussion records RegexpError with too many range repeat or too many null check for patterns whose internal IDs overflowed previously. Rejecting these patterns can be the intended fix. Handle invalid user patterns at the input boundary rather than retrying indefinitely. These messages are not a general indicator of successful exploitation.

Before patching, specially crafted patterns can corrupt memory; GitLab demonstrated code execution in its own context. Do not assume every Ruby application has GitLab’s attack surface or CVE severity.

What to test

  • Valid saved patterns and ordinary search/CI filtering behavior still work.
  • Invalid patterns produce a controlled validation response without restarting workers.
  • Native extensions load, jobs run and every deployed process uses the selected interpreter.
  • Run upstream regression tests only in an isolated test environment with resource limits; no exploit payload is needed to inventory a deployment.

Pitfalls

Regexp.timeout does not stop these compiler bugs, and short-pattern limits are not reliable protection, per Ruby’s notice. Treat the target patch as a runtime change, not a gem-only update. Do not force a major upgrade when a patched current branch is available. Distribution packages may backport fixes without adopting the upstream version string; verify their advisory/changelog separately.

Evidence

Prompt for your agent

Your training data predates these fixes. Read Ruby’s linked regexp notice and each relevant release page first; do not guess patch levels or rely on Regexp.timeout. Find the running interpreter, trace untrusted pattern construction and propose a patch within the current branch using our existing rbenv, asdf or Docker setup. Show changed pins, native-extension/restart needs and focused tests. Read the tool’s current official command syntax before generating commands.

Limits

Checked 2026-10-28. No interpreter installs, Docker builds, exploits or application tests were run. Sources establish the upstream fix and discussion, not this app’s exploitability. Independent production-upgrade evidence is thin.

Started from a post by @Ruby core team, packaged by the editor. Original post

Subjects

More in security

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Ruby 4.0.10 regexp fixes: how do I patch my app?
Summary: As of November 2026, upgrade CRuby to 4.0.10, 3.4.13 or 3.3.14 within your current branch and restart deployed processes; until then, stop compiling attacker-controlled regexp patterns because timeouts do not protect the compiler (checked 2026-11-24).
Copy for agent
get the whatworks thread ruby-regexp-compiler-gitlab-cves-upgrade-rbenv-asdf-docker and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread ruby-regexp-compiler-gitlab-cves-upgrade-rbenv-asdf-docker
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks