Ruby2Shell (CVE-2026-132825): critical Ruby heap overflow allows RCE in GitLab, GitHub Enterprise Server, Mastodon and other Ruby apps
Matéria consolidada. Reúne 2 matérias que o Tifon tinha publicado separadamente sobre a mesma história. A IA reescreveu o relatório com o que as 5 fontes trouxeram em 22/11/2026 04:07; os links antigos trazem para cá.
Fontes: blog.cloudflare.com ↗ cert.cyber.gouv.fr ↗ securityweek.com ↗ docs.gitlab.com ↗ securityonline.info ↗
Ruby2Shell (CVE-2026-132825) is a heap-based buffer overflow in Ruby's string case conversion for legacy single-byte encodings. It can lead to remote code execution (RCE). The Ruby team disclosed it on November 19, 2026 (blog.cloudflare.com), and fixes shipped on November 20 in Ruby 3.3.14, 3.4.13 and 4.0.10 (securityweek.com). On November 20, GitLab released CE/EE patch versions 19.6.1, 19.5.8 and 19.4.10 (docs.gitlab.com). Other products that bundle Ruby are also affected: GitHub Enterprise Server, Chatwoot, Mastodon, OpenProject and Discourse base images (securityweek.com, blog.cloudflare.com). No in-the-wild exploitation had been confirmed as of the sources (securityonline.info). Cloudflare warns that public proofs of concept are imminent (blog.cloudflare.com). GitLab.com and GitLab Dedicated were already protected before the public release (docs.gitlab.com, securityonline.info).
Entenda a falha
A vulnerabilidade
CVE-2026-132825 (Ruby2Shell) is a heap-based buffer overflow in Ruby's string case conversion for legacy single-byte encodings such as ISO-8859-1 and Windows-1252. It lets an attacker write one byte past a heap buffer, which can lead to remote code execution. Veria Labs says that in default Rails and classic-style Sinatra setups it is reachable without authentication, over the network, with no user interaction. Affected: Ruby 3.3.13 and earlier, 3.4.0 to 3.4.12 and 4.0.0 to 4.0.9, fixed in 3.3.14, 3.4.13 and 4.0.10. GitLab CE/EE before 19.4.10, 19.5 before 19.5.8 and 19.6 before 19.6.1 are affected through their bundled Ruby. GitHub Enterprise Server, Chatwoot, Mastodon, OpenProject and Discourse images also bundled an affected Ruby. Ruby rates it Critical, MITRE gives CVSS 7.4 High.
Como funciona
A web request carries text whose encoding is declared as a legacy single-byte charset. Rack's MethodOverride middleware, enabled by default in Rails and in classic-style Sinatra, converts the value of the _method parameter to uppercase while routing the request, before application code or authentication runs. In these encodings Ruby computes output space assuming each character stays one byte long. The German sharp s (ß) becomes two characters (SS) when uppercased, so Ruby writes two bytes after checking room for one. With enough such characters the output overruns the buffer by one byte and corrupts adjacent heap memory.
Por que é vulnerável
It is an off-by-one bounds error: in the affected code paths for 14 ISO-8859 and Windows-125x encodings, the space check assumes a one-byte result while the real result for ß is two bytes. UTF-8 strings use a different code path and are not affected. Veria Labs reports the bug has existed since Ruby 2.4.0. The fix, shipped in Ruby 3.3.14, 3.4.13 and 4.0.10, corrects this handling; Ruby 3.2 and earlier are end of life and will not receive it. GitLab fixed it by bumping its bundled Ruby.
Onde está
The flaw is in Ruby's case_map code, reached through upcase, swapcase, downcase(:fold) and casecmp?, and is tracked in the Ruby advisory GHSA-34m4-m9fh-gqp5.
Como foi descoberta
The articles credit Veria Labs with finding the off-by-one heap write. The Ruby team disclosed it on November 19, 2026 in an advisory covering multiple vulnerabilities in Regexp and String, and fixes shipped on November 20. GitLab.com and GitLab Dedicated were patched before the public release, with Dedicated getting interim internal releases. Cloudflare says it patched its own systems, found no compromise, and is working with Veria Labs. No in-the-wild exploitation was confirmed in the sources.
PoC existente, privada
O exploit existe, mas quem o tem não o publicou.
The Ruby team says it knows of proofs of concept that achieve RCE in some scenarios, and SecurityWeek reports PoC code exists for Ruby2Shell and four other flaws from the same release. None has been published: Veria Labs plans to release its own PoC after major vendors have patched, about a week after disclosure according to Cloudflare, which expects scanning to follow. WatchTowr says reliable exploitation is hard, needing a specific non-glibc allocator, runtime settings, application preconditions and an ASLR bypass, and malformed requests more likely cause denial of service. Patch soon, before the public PoC lands.
Explicação gerada por IA a partir da matéria e dos artigos, em 22/11/2026 04:23.
Detalhes técnicos
- The flaw is an off-by-one heap write in Ruby's case_map code (securityonline.info). It is triggered by case conversion in single-byte encodings such as ISO-8859-1 and Windows-1252 (securityweek.com).
- Cloudflare says it is exploitable before authentication in default Ruby on Rails and Sinatra configurations, via handling of the HTTP _method parameter (blog.cloudflare.com).
- Ruby released fixes for seven vulnerabilities in total. Proof-of-concept RCE exploits exist for Ruby2Shell and four others, some without CVEs yet (securityweek.com).
- Reliable exploitation in real environments is hard. It needs particular memory allocator configurations and runtime settings, and it must defeat ASLR (securityweek.com).
- A related integer overflow, GHSA-87fm-7w84-j2px, is also covered by Cloudflare's WAF rules (blog.cloudflare.com).
- The GitLab flaw comes from the bundled Ruby and affects Omnibus, source and container installations (docs.gitlab.com).
- France's CERT lists the affected GitLab versions as 19.5.x before 19.5.8, 19.6.x before 19.6.1, and versions earlier than 19.4.10, in both CE and EE (cert.cyber.gouv.fr).
- Many of the roughly 70 million GitLab users and half of the Fortune 100 run self-hosted nodes holding sensitive code and CI jobs (securityonline.info).
Remediação
- Upgrade GitLab to 19.6.1, 19.5.8 or 19.4.10 immediately. These releases need no database migrations and no major downtime (docs.gitlab.com, cert.cyber.gouv.fr).
- Self-compiled GitLab installations must rebuild Ruby with a patched version (docs.gitlab.com).
- Upgrade Ruby to 3.3.14, 3.4.13 or 4.0.10 or later for other Ruby applications. Cloudflare calls this the only complete fix (blog.cloudflare.com).
- Apply vendor patches for GitHub Enterprise Server, Chatwoot, Mastodon, OpenProject and Discourse images (securityweek.com).
- Cloudflare added two managed WAF rules, for CVE-2026-132825 and GHSA-87fm-7w84-j2px, for all customers including the free plan. This is only a compensating control, and Cloudflare recommends defense-in-depth including WAF attack scoring (blog.cloudflare.com).
- Cloudflare says it patched its own infrastructure and found no compromise. It is working with Veria Labs and monitoring as attack techniques evolve (blog.cloudflare.com).
Relatos divergentes
- Severity: GitLab cites CVSS 7.4 (High) per MITRE and a Critical rating from the Ruby security team (docs.gitlab.com). securityonline.info and securityweek.com repeat both ratings.
- Fixed versions: securityonline.info says GitLab patched versions "3.3.14, 3.4.13 and 4.0.10". These are Ruby versions, not GitLab versions. The GitLab advisory (docs.gitlab.com) lists Ruby 3.3.14 or 3.4.13 or later and GitLab 19.6.1, 19.5.8 and 19.4.10. securityweek.com and blog.cloudflare.com confirm Ruby 4.0.10 as well. The vendor advisory is the most authoritative.
- Exploitability: blog.cloudflare.com describes pre-authentication RCE in default Rails and Sinatra setups with public PoCs imminent. securityweek.com stresses that reliable exploitation requires hard-to-meet conditions. securityonline.info reports no confirmed exploitation in the wild. The later Cloudflare report (November 20, 20:24 UTC) is the most cautionary, but none of the sources confirms active exploitation.
- Dates: blog.cloudflare.com dates the Ruby disclosure to November 19. The other sources date the patches and advisories to November 20.
Linha do tempo
-
Cloudflare WAF deploys blocks for Ruby2Shell critical heap overflow (CVE-2026-132825) impacting Ruby apps and frameworks
This article provides detailed context on the Ruby2Shell flaw's exploitation path via HTTP _method parameter handling in default Rails and Sinatra configurations, explains Cloudflare’s introduction of two new WAF rules blocking CVE-2026-132825 and GHSA-87fm-7w84-j2px attack attempts for all customers, and highlights the importance of defense-in-depth including WAF attack scoring for post-exploit mitigation. It confirms the vulnerability's breadth across multiple self-hosted Ruby-based platforms and the urgency due to imminent public proofs of concept.
ler a análise desta fonte ocultar
This article provides detailed context on the Ruby2Shell flaw's exploitation path via HTTP _method parameter handling in default Rails and Sinatra configurations, explains Cloudflare’s introduction of two new WAF rules blocking CVE-2026-132825 and GHSA-87fm-7w84-j2px attack attempts for all customers, and highlights the importance of defense-in-depth including WAF attack scoring for post-exploit mitigation. It confirms the vulnerability's breadth across multiple self-hosted Ruby-based platforms and the urgency due to imminent public proofs of concept.
On November 19, 2026, the Ruby team disclosed a critical heap buffer overflow vulnerability tracked as CVE-2026-132825, known as Ruby2Shell, affecting Ruby's string case conversion methods in legacy single-byte encodings. This flaw allows remote code execution in default configurations of Ruby on Rails and Sinatra applications before authentication, impacting many self-hosted products bundling vulnerable Ruby versions, including GitLab, GitHub Enterprise Server, Mastodon, OpenProject, Discourse, and Chatwoot. Cloudflare's Web Application Firewall (WAF) has proactively deployed managed rules blocking exploit attempts for both Ruby2Shell and a related integer overflow (GHSA-87fm-7w84-j2px), offering protection to all customers including free plan users. The WAF is a compensating control emphasizing that upgrading Ruby to patched versions 3.3.14, 3.4.13, or 4.0.10 remains the only complete fix. Cloudflare has patched its own infrastructure and detected no compromise. Veria Labs and Cloudflare continue monitoring to update protections as attack techniques evolve.
-
Critical Remote Code Execution Vulnerability CVE-2026-132825 in GitLab Versions Prior to 19.5.8 and 19.6.1
ler a análise desta fonte ocultar
A critical remote code execution vulnerability has been discovered in GitLab Community Edition and Enterprise Edition affecting versions 19.5.x prior to 19.5.8, 19.6.x prior to 19.6.1, and versions earlier than 19.4.10. This flaw allows an attacker to execute arbitrary code remotely, posing a significant risk to systems using these GitLab versions. Users are strongly advised to update to patched versions immediately to mitigate the risk. The vulnerability is tracked under CVE-2026-132825, and official security bulletins and patches were released by GitLab on November 20, 2026, providing detailed guidance on remediation.
-
Ruby fixes critical Ruby2Shell heap overflow vulnerability enabling remote code execution
This article expands the scope of the Ruby2Shell (CVE-2026-132825) vulnerability report by detailing its impact beyond GitLab, including other major Ruby-based frameworks and products like GitHub Enterprise Server, Chatwoot, Mastodon, OpenProject, and Discourse. It also describes additional vulnerabilities with proof-of-concept RCE exploits not yet assigned CVEs, outlines the difficulty of reliable exploitation in production environments due to memory layout challenges and ASLR, and confirms that patches have been released in Ruby 4.0.10, 3.4.13, and 3.3.14 versions. The article advises urgent application of these fixes to mitigate the risks of denial-of-service and remote code execution attacks. These details enrich the understanding of the vulnerability's broader ecosystem impact and exploitation complexity beyond the original GitLab advisory.
ler a análise desta fonte ocultar
This article expands the scope of the Ruby2Shell (CVE-2026-132825) vulnerability report by detailing its impact beyond GitLab, including other major Ruby-based frameworks and products like GitHub Enterprise Server, Chatwoot, Mastodon, OpenProject, and Discourse. It also describes additional vulnerabilities with proof-of-concept RCE exploits not yet assigned CVEs, outlines the difficulty of reliable exploitation in production environments due to memory layout challenges and ASLR, and confirms that patches have been released in Ruby 4.0.10, 3.4.13, and 3.3.14 versions. The article advises urgent application of these fixes to mitigate the risks of denial-of-service and remote code execution attacks. These details enrich the understanding of the vulnerability's broader ecosystem impact and exploitation complexity beyond the original GitLab advisory.
The Ruby programming language has released security updates addressing seven vulnerabilities, including the critical Ruby2Shell flaw (CVE-2026-132825) with a CVSS score of 7.4. Ruby2Shell is a heap-based buffer overflow occurring during string case conversion in certain single-byte encodings, such as ISO-8859-1 and Windows-1252, potentially allowing remote code execution (RCE). Proof-of-concept exploits exist for Ruby2Shell and four other vulnerabilities; however, successful exploitation in real environments requires specific challenging conditions, including particular memory allocator configurations, runtime settings, and defeating ASLR. Affected popular software that uses Ruby, such as GitHub Enterprise Server, Chatwoot, GitLab, Mastodon, OpenProject, and Discourse base images, have issued patches. The issues are fixed in Ruby versions 4.0.10, 3.4.13, and 3.3.14, and users are advised to promptly apply mitigations to prevent denial-of-service and potential remote code execution risks.
-
GitLab releases critical security patches (19.6.1, 19.5.8, 19.4.10) addressing Ruby heap buffer overflow CVE-2026-132825
This official GitLab advisory clarifies that the critical heap overflow vulnerability CVE-2026-132825 affects all deployment types, including Omnibus, source installations, and container images. It specifies the exact patched GitLab and Ruby versions and emphasizes that self-compiled GitLab installations must rebuild Ruby with patched versions. The advisory also confirms that GitLab.com and GitLab Dedicated were already protected prior to the public patch release through internal mitigations. It details no new migrations or downtime are expected during upgrade, easing operational concerns for self-managed deployments.
ler a análise desta fonte ocultar
This official GitLab advisory clarifies that the critical heap overflow vulnerability CVE-2026-132825 affects all deployment types, including Omnibus, source installations, and container images. It specifies the exact patched GitLab and Ruby versions and emphasizes that self-compiled GitLab installations must rebuild Ruby with patched versions. The advisory also confirms that GitLab.com and GitLab Dedicated were already protected prior to the public patch release through internal mitigations. It details no new migrations or downtime are expected during upgrade, easing operational concerns for self-managed deployments.
On November 20, 2026, GitLab issued emergency patch releases (CE and EE) 19.6.1, 19.5.8, and 19.4.10 to remediate a critical Ruby vulnerability CVE-2026-132825, a heap-based buffer overflow triggered by string case conversion in Ruby, which may enable remote code execution under certain conditions. This flaw impacts all GitLab installation types, including Omnibus, source, and containers, by virtue of the bundled Ruby version. GitLab.com and GitLab Dedicated instances had already been protected via prior internal mitigations. The fix requires updating Ruby to versions 3.3.14 or 3.4.13 or later; self-compiled GitLab installations must rebuild Ruby accordingly. This vulnerability carries a High severity rating (CVSS 7.4) per MITRE and a Critical rating from the Ruby security team. These patch releases do not introduce database migrations or major downtime, facilitating prompt upgrades. GitLab strongly recommends immediate updates to all vulnerable systems.
-
GitLab patches critical Ruby2Shell heap overflow leading to remote code execution (CVE-2026-132825)
ler a análise desta fonte ocultar
On November 20, 2026, GitLab released urgent patches addressing a critical heap overflow vulnerability in its bundled Ruby engine, tracked as CVE-2026-132825. The flaw, dubbed Ruby2Shell, is an off-by-one heap write in Ruby's case_map code affecting string case conversion for certain encodings, which can lead to remote code execution (RCE) under specific conditions. The Ruby security team rates this bug as Critical, and it carries a CVSS v3 base score of 7.4 (High). While no exploitation in the wild has been confirmed, the risk is significant due to GitLab's widespread use by over 70 million users and half the Fortune 100, many on self-hosted nodes where sensitive code and CI jobs run. GitLab patched the vulnerability in versions 3.3.14, 3.4.13, and 4.0.10; self-hosted admins are urged to upgrade immediately. GitLab.com and GitLab Dedicated were already running patched versions before this release.