Ruby heap buffer overflow in string case conversion
- Exploited
- No known exploitation
- Fix
- Fixed in 3.3.14, 3.4.13, 4.0.10
- Who is exposed
- Specific setups only
Summary
Ruby, before the fixed releases listed in its advisory, has a heap-based buffer overflow during case conversion that can write one byte outside a buffer when handling encodings such as ISO-8859-1 or Windows-1252. An attacker with local access, and no login or user action needed, can use it to corrupt memory.
Written by a model
Original description
Ruby before 3.3.14, 3.4.13, and 4.0.10 has a heap-based buffer overflow during case conversion. One byte can be written outside a buffer for, for example, ISO-8859-1 or Windows-1252.
Who should check
Teams running Ruby 3.3.13 and earlier, 3.4.0 through 3.4.12, or 4.0.0 through 4.0.9, especially apps that change case of strings in ISO-8859-1 or Windows-1252.
“Ruby 3.3.13 and earlier”
What to do
Check whether your setup matches what the bug needs.
Ruby 3.3.13 and earlier is affected. Ruby 3.4.0 through 3.4.12 is affected. Ruby 4.0.0 through 4.0.9 is affected. The case of a string in a single-byte encoding such as ISO-8859-1 or Windows-1252 is changed.Upgrade to a fixed version: 3.3.14, 3.4.13, 4.0.10.
Check your systems with an agent
Paste this into a coding or ops agent. It checks your systems read-only and reports a table per asset.
Check whether my systems are affected by CVE-2026-132825 (Ruby before 3.3.14, 3.4.13, and 4.0.10 has a heap-based buffer overflow during case conversion.), using the cve.now data below.
Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.
What cve.now has for CVE-2026-132825 (entry last updated 2026-11-20):
Affected:
- ruby-lang Ruby: fixed in 3.3.14; from 3.4.0, fixed in 3.4.13; from 4.0.0, fixed in 4.0.10
Fixed versions: 3.3.14, 3.4.13, 4.0.10.
Conditions (all must be true for the bug to be hit):
- Ruby 3.3.13 and earlier is affected. (source: https://www.ruby-lang.org/en/news/2026/11/18/multiple-vulnerabilities-in-regexp-and-string/)
- Ruby 3.4.0 through 3.4.12 is affected. (source: https://www.ruby-lang.org/en/news/2026/11/18/multiple-vulnerabilities-in-regexp-and-string/)
- Ruby 4.0.0 through 4.0.9 is affected. (source: https://www.ruby-lang.org/en/news/2026/11/18/multiple-vulnerabilities-in-regexp-and-string/)
- The case of a string in a single-byte encoding such as ISO-8859-1 or Windows-1252 is changed. (source: https://github.com/ruby/ruby/security/advisories/GHSA-34m4-m9fh-gqp5)
Setup: unknown whether the bug needs a non-default feature or setting. Check the advisory.
Attacker needs: local access, no login, no user action.
CISA KEV: CVE-2026-132825 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-132825 only. If you also check another CVE, look up its own KEV status; never assume it from this one.
How to check:
- Installed software: check what is actually running, not what a repo declares. Read the version from each host, container image and Kubernetes node (the binary's version output, the OS package database, image layers), and check whether the conditions above hold there. Distribution packages may carry a backported fix under an older version number; confirm against the distribution's own advisory.
Verify against the linked advisories before concluding, and cite the date you read each one:
- https://news.ycombinator.com/item?id=50554038
- https://www.ruby-lang.org/en/news/2026/11/18/multiple-vulnerabilities-in-regexp-and-string/
- https://github.com/ruby/ruby/security/advisories/GHSA-34m4-m9fh-gqp5
- https://ubuntu.com/security/CVE-2026-132825
- https://bugzilla.suse.com/show_bug.cgi?id=1290919
- https://verialabs.com/ruby2shell/
- https://github.com/evenomn/CVE-2026-132825
- https://github.com/semgrep/detection-scripts/pull/16
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.
Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.
Entry: https://cve.now/CVE-2026-132825
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-132825"}.Affected versions
- ruby-lang Rubyfixed in 3.3.14; From 3.4.0 · fixed in 3.4.13; From 4.0.0 · fixed in 4.0.10
cve.now Index
- Exploitation0/40No signal
- Exposure5/25Specific setups only
- Reach?/20Unknown. No tracked technology or package matched
- Severity8.4/10CVSS 7.4, total technical impact per CISA
- No patch0/5No signal
What would change the score
- Would score about 63 if added to CISA KEV
- Would score about 58 if CISA's SSVC rates exploitation active
- Would score about 23 if CISA's SSVC rates it automatable
Timeline
- CVE published
- First seen by cve.now
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: total
1 day - Record last updated
Evidence 13
| Kind | Source |
|---|---|
| Vendor advisory 1Establishes: Affected and fixed versions. | |
| Advisory | GitHub · ruby/ruby · Advisory GHSA-34m4-m9fh-gqp5 |
| CVE record 2Establishes: The identifier and description. | |
| Record | CVE List · CVE-2026-132825 |
| Record | NVD · CVE-2026-132825 |
| Public exploit code 2Establishes: Public exploit code exists (Exploit-DB, Metasploit, Nuclei and GitHub). | |
| Exploit | GitHub · scadastrangelove/ruby2shell · Repository |
| Repository | GitHub · evenomn/CVE-2026-132825 · Repository |
| Write-ups 1Establishes: Technical detail and context. | |
| Link | openwall.com · lists/oss-security/2026/11/20/5 |
| Other links 7 | |
| Repository | GitHub · semgrep/detection-scripts · Pull request #16 |
| Link | news.ycombinator.com · item?id=50554038 |
| Link | ruby-lang.org · en/news/2026/11/18/multiple-vulnerabilities-in-regexp-and-string |
| Link | ubuntu.com · security/CVE-2026-132825 |
| Link | bugzilla.suse.com · show_bug.cgi?id=1290919 |
| Link | verialabs.com · ruby2shell |
| Link | gitlab.com · gitlab-org/omnibus-gitlab/-/commit/8fcf9d6372da3fe553bd21c3beae70634d6ba936 |
Questions about CVE-2026-132825
Is CVE-2026-132825 being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.
Source: cve.now feed data
What does this mean?
Changing the case of a crafted string in some single-byte encodings, such as ISO-8859-1 and Windows-1252, can write one byte past a heap buffer. The advisory says this may allow remote code execution.
Source: ruby-lang.org, github.com
Which versions are affected by CVE-2026-132825?
Ruby: before 3.3.14; from 3.4.0 before 3.4.13; from 4.0.0 before 4.0.10.
Source: cve.now feed data
Am I affected, and how do I check?
Ruby 3.3.13 and earlier, Ruby 3.4.0 through 3.4.12, and Ruby 4.0.0 through 4.0.9 are listed as affected. The issue only applies when case conversion runs on a string in one of these single-byte encodings, so check your Ruby version with `ruby -v` and the encoding of the strings your code converts.
Source: ruby-lang.org, github.com
How do I fix CVE-2026-132825?
The facts provided do not name a fixed version or patch identifier for this vulnerability, so no upgrade target can be stated from this data. Check the vendor's advisory for the fixed release lines.
Source: ruby-lang.org, github.com
Related
- CVE-2026-46727An issue was discovered in Ruby 4 before 4.0.5.
- CVE-2025-27219In the CGI gem before 0.4.2 for Ruby, the CGI::Cookie.parse method in the CGI library contains a potential Denial of Service (DoS)…
- CVE-2025-27220In the CGI gem before 0.4.2 for Ruby, a Regular Expression Denial of Service (ReDoS) vulnerability exists in the Util#escapeElement method.
- CVE-2025-27221In the URI gem before 1.0.3 for Ruby, the URI handling methods (URI.join, URI#merge, URI#+) have an inadvertent leakage of authentication…
- CVE-2026-121481Calling EVP_EncodeBlock() with an input length close to INT_MAX may overflow the calculation of the encoded output size and write past the…
- CVE-2026-131061Buffer overflow in Color in Google Chrome prior to 158.0.8127.36 allowed a remote attacker to execute arbitrary code outside the sandbox…
No corrections so far. Something wrong on this page? Report an error.