cve.bz

CVE-2026-80213 ruby resolv: Numeric Truncation Error

4.0 mediumEPSS 0.3%

Medium (4.0) in ruby resolv. EPSS 0.3% estimated probability of exploitation activity in the next 30 days.

On this page
An issue was discovered in the resolv gem before 0.7.2 for Ruby. Resolv::DNS::MessageEncoder wrote a DNS label's length into a single octet without checking its range. A label longer than 255 octets had its length stored modulo 256 but the label data was written unchanged, and thus the bytes on the wire described a different name than the one the application asked to encode. RFC 1035 section 2.3.4 limits a label to 63 octets, and the two high bits of the length octet are reserved for compression pointers. put_string packed the length with put_pack("C", d.length) and put_label used it for labels, and thus any value from 0 to 255 could end up as a label length octet, including the reserved 0x40-0xBF range and the 0xC0-0xFF pointer range. Resolv::DNS::Name.create did not check per-label or total name length either, and thus an attacker-controlled hostname reached the encoder unchanged. An application that resolves an attacker-controlled hostname sends a query whose wire bytes name a domain the attacker chose. A hostname suffix that the application validates against an allowlist becomes padding that never appears on the wire, and thus allowlist and egress checks can be bypassed. The recursive resolver caches the response under the attacker's name, and DNS logs record that name rather than the one the application asked for. A label length whose low octet lands in the 0xC0-0xFF range produces a length octet that conforming parsers read as the start of a compression pointer, with the following attacker-controlled byte as the offset.

Severity

CVSS 3.1

4.0 medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N
EPSS
0.3% (unchanged from 0.3% a week ago; 0.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 20th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2026-08-27. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-197 Numeric Truncation Error
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-80213 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-80213?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-80213?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-80213 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Ruby resolvbefore 0.3.2
Ruby resolvfrom 0.4.0 before 0.7.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12ruby3.1no fix listedDEBIAN-CVE-2026-80213
Debian13ruby3.33.3.13-0+deb13u1DEBIAN-CVE-2026-80213 DSA-6614-1
Debian14ruby3.3no fix listedDEBIAN-CVE-2026-80213
Red Hathummingbird:1ruby3.3, ruby3.3-doc, ruby3.3-libs and 3 more0:3.3.10-23.5.hum1RHSA-2026:57986
Red Hathummingbird:1ruby3.3, ruby3.3-doc, ruby3.3-libs and 3 more0:3.3.10-23.6.hum1RHSA-2026:62562
Red Hathummingbird:1ruby3.4, ruby3.4-doc, ruby3.4-libs and 3 more0:3.4.10-31.6.hum1RHSA-2026:57994
Red Hathummingbird:1ruby4.0, ruby4.0-doc, ruby4.0-libs and 3 more0:4.0.6-37.2.hum1RHSA-2026:57565
Red Hathummingbird:1ruby4.0, ruby4.0-doc, ruby4.0-libs and 3 more0:4.0.6-37.3.hum1RHSA-2026:62563
Red Hathummingbird:1rubygem3.3-bigdecimal0:3.1.5-23.6.hum1RHSA-2026:62562
Red Hathummingbird:1rubygem3.3-bundler0:2.5.22-23.6.hum1RHSA-2026:62562
Red Hathummingbird:1rubygem3.3-devel, rubygem3.3-rubygems0:3.5.22-23.6.hum1RHSA-2026:62562
Red Hathummingbird:1rubygem3.3-io-console0:0.7.1-23.6.hum1RHSA-2026:62562
Red Hathummingbird:1rubygem3.3-irb0:1.13.1-23.6.hum1RHSA-2026:62562
Red Hathummingbird:1rubygem3.3-json0:2.7.2-23.6.hum1RHSA-2026:62562
Red Hathummingbird:1rubygem3.3-minitest0:5.20.0-23.6.hum1RHSA-2026:62562
42 more for Red Hat in the JSON and on Red Hat's page.
Alpinev3.21ruby3.3.13-r0ALPINE-CVE-2026-80213
Alpinev3.22, v3.23, v3.24ruby3.4.12-r0ALPINE-CVE-2026-80213
Azure Linux3ruby3.3.5-9AZL-98229
Alpaquita23ruby3.3.13-r0BELL-CVE-2026-80213
Alpaquita25, streamruby3.4.12-r0BELL-CVE-2026-80213

From the distributions' data via OSV.dev: the Debian Security Tracker; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Red Hat · Alpine · Alpaquita.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This is a Moderate impact vulnerability in the Ruby `resolv` gem, which is part of the Ruby standard library. This flaw allows for DNS allowlist and egress bypass, and cache poisoning. When an application processes attacker-controlled hostnames, it can result in DNS queries for unintended domains, potentially circumventing network access restrictions or domain validation checks.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

ProductPackageStateAdvisory
Red Hat Hardened Imagesruby4-0-main-4.0.6-37.2.hum1Fixed 2026-08-20RHSA-2026:57565
Red Hat Hardened Imagesruby3-3-main-3.3.10-23.5.hum1Fixed 2026-08-21RHSA-2026:57986
Red Hat Hardened Imagesruby3-4-main-3.4.10-31.6.hum1Fixed 2026-08-21RHSA-2026:57994
Red Hat Hardened Imagesruby3-3-main-0.21.9-23.6.hum1Fixed 2026-09-02RHSA-2026:62562
Red Hat Hardened Imagesruby3-3-main-3.3.10-23.6.hum1Fixed 2026-09-02RHSA-2026:62562
Red Hat Hardened Imagesruby4-0-main-0.3.2-37.3.hum1Fixed 2026-09-02RHSA-2026:62563
Red Hat Hardened Imagesruby4-0-main-4.0.6-37.3.hum1Fixed 2026-09-02RHSA-2026:62563
Lightspeed Corelightspeed-core/rag-tool-cpu-rhel9Fix deferred
Lightspeed Corelightspeed-core/rag-tool-cuda-12.9-rhel9Fix deferred
Red Hat 3scale API Management Platform 23scale-amp2/backend-rhel8Out of support scope
Red Hat 3scale API Management Platform 23scale-amp2/toolbox-rhel9Out of support scope
Red Hat Enterprise Linux 10rubyFix deferred
Red Hat Enterprise Linux 10ruby4.0Fix deferred
Red Hat Enterprise Linux 10ubi10/ruby-33Fix deferred
Red Hat Enterprise Linux 10ubi10/ruby-40Fix deferred
Red Hat Enterprise Linux 6rubyOut of support scope
Red Hat Enterprise Linux 7rubyFix deferred
Red Hat Enterprise Linux 8ruby:2.5/rubyFix deferred
Red Hat Enterprise Linux 8ruby:3.3/rubyFix deferred
Red Hat Enterprise Linux 8ubi8/ruby-33Fix deferred
6 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-80213.

References

Check your stackJSON