Skip to content
OpenAdvisories
Medium · 4.0 CVE-2026-80213 EUVD-2026-67139GHSA-jr95-x3fr-rcg4

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…

Published Aug 27, 2026 · Updated Aug 27, 2026 · Assigned by mitre

Description

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.

Affected products

VendorProductAffectedFixed
Ruby resolv < 0.3.2, 0.4.0 – < 0.7.2 0.3.2

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 ruby3.3 No fix yet —
Debian 13 ruby3.3 3.3.13-0+deb13u1 —
Debian 12 ruby3.1 No fix yet —
ReleasePackageFixed inAdvisory
Red Hat Hardened Images 1 ruby3.3 +5 3.3.10-23.5.hum1 RHSA-2026:62562, RHSA-2026:57986
Red Hat Hardened Images 1 ruby3.4 +5 3.4.10-31.6.hum1 RHSA-2026:57994
Red Hat Hardened Images 1 ruby4.0 +5 4.0.6-37.2.hum1 RHSA-2026:62563, RHSA-2026:57565
Red Hat Hardened Images 1 rubygem3.3-bigdecimal 3.1.5-23.6.hum1 RHSA-2026:62562
Red Hat Hardened Images 1 rubygem3.3-bundler 2.5.22-23.6.hum1 RHSA-2026:62562
Red Hat Hardened Images 1 rubygem3.3-devel +1 3.5.22-23.6.hum1 RHSA-2026:62562
Red Hat Hardened Images 1 rubygem3.3-io-console 0.7.1-23.6.hum1 RHSA-2026:62562
Red Hat Hardened Images 1 rubygem3.3-irb 1.13.1-23.6.hum1 RHSA-2026:62562
Red Hat Hardened Images 1 rubygem3.3-json 2.7.2-23.6.hum1 RHSA-2026:62562
Red Hat Hardened Images 1 rubygem3.3-minitest 5.20.0-23.6.hum1 RHSA-2026:62562
Red Hat Hardened Images 1 rubygem3.3-power_assert 2.0.3-23.6.hum1 RHSA-2026:62562
Red Hat Hardened Images 1 rubygem3.3-psych 5.1.2-23.6.hum1 RHSA-2026:62562
Red Hat Hardened Images 1 rubygem3.3-racc 1.7.3-23.6.hum1 RHSA-2026:62562
Red Hat Hardened Images 1 rubygem3.3-rake 13.1.0-23.6.hum1 RHSA-2026:62562
Red Hat Hardened Images 1 rubygem3.3-rbs 3.4.0-23.6.hum1 RHSA-2026:62562
Red Hat Hardened Images 1 rubygem3.3-rdoc 6.6.3.1-23.6.hum1 RHSA-2026:62562
Red Hat Hardened Images 1 rubygem3.3-rexml 3.4.4-23.6.hum1 RHSA-2026:62562
Red Hat Hardened Images 1 rubygem3.3-rss 0.3.1-23.6.hum1 RHSA-2026:62562
Red Hat Hardened Images 1 rubygem3.3-test-unit 3.6.1-23.6.hum1 RHSA-2026:62562
Red Hat Hardened Images 1 rubygem3.3-typeprof 0.21.9-23.6.hum1 RHSA-2026:62562
Red Hat Hardened Images 1 rubygem4.0-bigdecimal 4.0.1-37.2.hum1 RHSA-2026:62563, RHSA-2026:57565
Red Hat Hardened Images 1 rubygem4.0-devel +2 4.0.16-37.2.hum1 RHSA-2026:62563, RHSA-2026:57565
Red Hat Hardened Images 1 rubygem4.0-io-console 0.8.2-37.2.hum1 RHSA-2026:62563, RHSA-2026:57565
Red Hat Hardened Images 1 rubygem4.0-irb 1.16.0-37.2.hum1 RHSA-2026:62563, RHSA-2026:57565
Red Hat Hardened Images 1 rubygem4.0-json 2.18.0-37.2.hum1 RHSA-2026:62563, RHSA-2026:57565
Red Hat Hardened Images 1 rubygem4.0-minitest 6.0.0-37.2.hum1 RHSA-2026:62563, RHSA-2026:57565
Red Hat Hardened Images 1 rubygem4.0-power_assert 3.0.1-37.2.hum1 RHSA-2026:62563, RHSA-2026:57565
Red Hat Hardened Images 1 rubygem4.0-psych 5.3.1-37.2.hum1 RHSA-2026:62563, RHSA-2026:57565
Red Hat Hardened Images 1 rubygem4.0-racc 1.8.1-37.2.hum1 RHSA-2026:62563, RHSA-2026:57565
Red Hat Hardened Images 1 rubygem4.0-rake 13.3.1-37.2.hum1 RHSA-2026:62563, RHSA-2026:57565
Red Hat Hardened Images 1 rubygem4.0-rbs 3.10.0-37.2.hum1 RHSA-2026:62563, RHSA-2026:57565
Red Hat Hardened Images 1 rubygem4.0-rdoc 7.0.4-37.2.hum1 RHSA-2026:62563, RHSA-2026:57565
Red Hat Hardened Images 1 rubygem4.0-rexml 3.4.4-37.2.hum1 RHSA-2026:62563, RHSA-2026:57565
Red Hat Hardened Images 1 rubygem4.0-rss 0.3.2-37.2.hum1 RHSA-2026:62563, RHSA-2026:57565
Red Hat Hardened Images 1 rubygem4.0-test-unit 3.7.5-37.2.hum1 RHSA-2026:62563, RHSA-2026:57565
Red Hat Hardened Images 1 rubygem4.0-typeprof 0.31.1-37.2.hum1 RHSA-2026:62563, RHSA-2026:57565
ReleasePackageFixed inAdvisory
Alpine v3.24 ruby 3.4.12-r0 —
Alpine v3.23 ruby 3.4.12-r0 —
Alpine v3.22 ruby 3.4.12-r0 —
Alpine v3.21 ruby 3.3.13-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 ruby3.4 +5 3.4.8-27.amzn2023.0.7 ALAS2023-2026-2145
Amazon Linux 2023 ruby3.4-rubygem-bigdecimal 3.1.8-27.amzn2023.0.7 ALAS2023-2026-2145
Amazon Linux 2023 ruby3.4-rubygem-bundler 2.6.9-27.amzn2023.0.7 ALAS2023-2026-2145
Amazon Linux 2023 ruby3.4-rubygem-io-console 0.8.1-27.amzn2023.0.7 ALAS2023-2026-2145
Amazon Linux 2023 ruby3.4-rubygem-irb 1.14.3-27.amzn2023.0.7 ALAS2023-2026-2145
Amazon Linux 2023 ruby3.4-rubygem-json 2.9.1-27.amzn2023.0.7 ALAS2023-2026-2145
Amazon Linux 2023 ruby3.4-rubygem-minitest 5.25.4-27.amzn2023.0.7 ALAS2023-2026-2145
Amazon Linux 2023 ruby3.4-rubygem-power_assert 2.0.5-27.amzn2023.0.7 ALAS2023-2026-2145
Amazon Linux 2023 ruby3.4-rubygem-psych 5.2.2-27.amzn2023.0.7 ALAS2023-2026-2145
Amazon Linux 2023 ruby3.4-rubygem-racc 1.8.1-27.amzn2023.0.7 ALAS2023-2026-2145
Amazon Linux 2023 ruby3.4-rubygem-rake 13.2.1-27.amzn2023.0.7 ALAS2023-2026-2145
Amazon Linux 2023 ruby3.4-rubygem-rbs 3.8.0-27.amzn2023.0.7 ALAS2023-2026-2145
Amazon Linux 2023 ruby3.4-rubygem-rdoc 6.14.0-27.amzn2023.0.7 ALAS2023-2026-2145
Amazon Linux 2023 ruby3.4-rubygem-rexml 3.4.4-27.amzn2023.0.7 ALAS2023-2026-2145
Amazon Linux 2023 ruby3.4-rubygem-rss 0.3.1-27.amzn2023.0.7 ALAS2023-2026-2145
Amazon Linux 2023 ruby3.4-rubygem-test-unit 3.6.7-27.amzn2023.0.7 ALAS2023-2026-2145
Amazon Linux 2023 ruby3.4-rubygem-typeprof 0.30.1-27.amzn2023.0.7 ALAS2023-2026-2145
Amazon Linux 2023 ruby3.4-rubygems +1 3.6.9-27.amzn2023.0.7 ALAS2023-2026-2145
Amazon Linux 2023 ruby4.0 +6 4.0.1-32.amzn2023.0.4 ALAS2023-2026-2144
Amazon Linux 2023 ruby4.0-rubygem-io-console 0.8.2-32.amzn2023.0.4 ALAS2023-2026-2144
Amazon Linux 2023 ruby4.0-rubygem-irb 1.16.0-32.amzn2023.0.4 ALAS2023-2026-2144
Amazon Linux 2023 ruby4.0-rubygem-json 2.18.0-32.amzn2023.0.4 ALAS2023-2026-2144
Amazon Linux 2023 ruby4.0-rubygem-minitest 6.0.0-32.amzn2023.0.4 ALAS2023-2026-2144
Amazon Linux 2023 ruby4.0-rubygem-power_assert 3.0.1-32.amzn2023.0.4 ALAS2023-2026-2144
Amazon Linux 2023 ruby4.0-rubygem-psych 5.3.1-32.amzn2023.0.4 ALAS2023-2026-2144
Amazon Linux 2023 ruby4.0-rubygem-racc 1.8.1-32.amzn2023.0.4 ALAS2023-2026-2144
Amazon Linux 2023 ruby4.0-rubygem-rake 13.3.1-32.amzn2023.0.4 ALAS2023-2026-2144
Amazon Linux 2023 ruby4.0-rubygem-rbs 3.10.0-32.amzn2023.0.4 ALAS2023-2026-2144
Amazon Linux 2023 ruby4.0-rubygem-rdoc 7.0.3-32.amzn2023.0.4 ALAS2023-2026-2144
Amazon Linux 2023 ruby4.0-rubygem-rexml 3.4.4-32.amzn2023.0.4 ALAS2023-2026-2144
Amazon Linux 2023 ruby4.0-rubygem-rss 0.3.2-32.amzn2023.0.4 ALAS2023-2026-2144
Amazon Linux 2023 ruby4.0-rubygem-test-unit 3.7.5-32.amzn2023.0.4 ALAS2023-2026-2144
Amazon Linux 2023 ruby4.0-rubygem-typeprof 0.31.1-32.amzn2023.0.4 ALAS2023-2026-2144
Amazon Linux 2023 ruby4.0-rubygems +2 4.0.3-32.amzn2023.0.4 ALAS2023-2026-2144

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 ruby 3.3.5-9 —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling ruby-3.2 No fix yet —
Wolfi rolling ruby-3.3 3.3.12-r5 —
Wolfi rolling ruby-3.4 3.4.10-r7 —
Wolfi rolling ruby-4.0 4.0.7-r0 —

Advisories 8

References