Skip to content

CVE-2026-80213 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 h...

MediumCVSS 4.0 EPSS 0.27%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: no · technical impact: partial
Technology
DebianRed Hat

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.

Upgrade path

28 packages: 10 fixed, 18 with no fix yet.

PackageAffectedFixed inStatus
debian/ruby3.1(Debian 12) = 3.1.2-7; = 3.1.2-7+deb12u1; = 3.1.2-7+hurd.1; = 3.1.2-8 +5 more No fix listed No fix yet
debian/ruby3.3(Debian 14) = 3.3.8-2; = 3.3.8-2.1; = 3.3.8-2.2; All versions No fix listed No fix yet
redhat/lightspeed-core/rag-tool-cpu-rhel9(Red Hat lightspeed_core) All versions No fix listed No fix yet
redhat/lightspeed-core/rag-tool-cuda-12.9-rhel9(Red Hat lightspeed_core) All versions No fix listed No fix yet
redhat/ruby(Red Hat enterprise_linux 10) All versions No fix listed No fix yet
redhat/ruby(Red Hat enterprise_linux 9) All versions No fix listed No fix yet
redhat/ruby(Red Hat rhel_els 7) All versions No fix listed No fix yet
redhat/ruby4.0(Red Hat enterprise_linux 10) All versions No fix listed No fix yet
redhat/ruby:2.5/ruby(Red Hat enterprise_linux 8) All versions No fix listed No fix yet
redhat/ruby:3.3/ruby(Red Hat enterprise_linux 8) All versions No fix listed No fix yet
redhat/ruby:3.3/ruby(Red Hat enterprise_linux 9) All versions No fix listed No fix yet
redhat/ruby:4.0/ruby(Red Hat enterprise_linux 9) All versions No fix listed No fix yet
redhat/ubi10/ruby-33(Red Hat enterprise_linux 10) All versions No fix listed No fix yet
redhat/ubi10/ruby-40(Red Hat enterprise_linux 10) All versions No fix listed No fix yet
redhat/ubi8/ruby-33(Red Hat enterprise_linux 8) All versions No fix listed No fix yet
redhat/ubi9/ruby-30(Red Hat enterprise_linux 9) All versions No fix listed No fix yet
redhat/ubi9/ruby-33(Red Hat enterprise_linux 9) All versions No fix listed No fix yet
redhat/ubi9/ruby-40(Red Hat enterprise_linux 9) All versions No fix listed No fix yet
alpine/ruby(Alpine v3.21) < 3.3.13-r0 3.3.13-r0 Fixed
alpine/ruby(Alpine v3.22) < 3.4.12-r0 3.4.12-r0 Fixed
alpine/ruby(Alpine v3.23) < 3.4.12-r0 3.4.12-r0 Fixed
alpine/ruby(Alpine v3.24) < 3.4.12-r0 3.4.12-r0 Fixed
azure linux ruby(Azure Linux 4.0) < 0:3.4.10-36.azl4 0:3.4.10-36.azl4 Fixed
debian/ruby3.3(Debian 13) < 3.3.13-0+deb13u1; = 3.3.8-2; = 3.3.8-2.1; = 3.3.8-2.2 3.3.13-0+deb13u1 Fixed
redhat/ruby3-3-main(Red Hat hummingbird 1) < 0.21.9-23.6.hum1; < 3.3.10-23.5.hum1; < 3.3.10-23.6.hum1 0.21.9-23.6.hum1, 3.3.10-23.5.hum1, 3.3.10-23.6.hum1 Fixed
redhat/ruby3-4-main(Red Hat hummingbird 1) < 3.4.10-31.6.hum1 3.4.10-31.6.hum1 Fixed
redhat/ruby4-0-main(Red Hat hummingbird 1) < 0.3.2-37.3.hum1; < 4.0.6-37.2.hum1; < 4.0.6-37.3.hum1 0.3.2-37.3.hum1, 4.0.6-37.2.hum1, 4.0.6-37.3.hum1 Fixed
rubygems resolv < 0.3.2; >= 0.4.0, < 0.7.2 0.3.2, 0.7.2 Fixed

Affected products

ProductAffected versionsFixed in
rubygems resolv < 0.3.2 0.3.2
rubygems resolv >= 0.4.0, < 0.7.2 0.7.2
redhat/ruby4-0-main(Red Hat:hummingbird:1) < 4.0.6-37.2.hum1 4.0.6-37.2.hum1
redhat/ruby3-3-main(Red Hat:hummingbird:1) < 3.3.10-23.5.hum1 3.3.10-23.5.hum1
redhat/ruby3-4-main(Red Hat:hummingbird:1) < 3.4.10-31.6.hum1 3.4.10-31.6.hum1
redhat/ruby3-3-main(Red Hat:hummingbird:1) < 0.21.9-23.6.hum1 0.21.9-23.6.hum1
redhat/ruby3-3-main(Red Hat:hummingbird:1) < 3.3.10-23.6.hum1 3.3.10-23.6.hum1
redhat/ruby4-0-main(Red Hat:hummingbird:1) < 0.3.2-37.3.hum1 0.3.2-37.3.hum1
redhat/ruby4-0-main(Red Hat:hummingbird:1) < 4.0.6-37.3.hum1 4.0.6-37.3.hum1
redhat/lightspeed-core/rag-tool-cpu-rhel9(Red Hat:lightspeed_core) All versions No fix listed
redhat/lightspeed-core/rag-tool-cuda-12.9-rhel9(Red Hat:lightspeed_core) All versions No fix listed
redhat/3scale-amp2/backend-rhel8(Red Hat:3scale:2.13) All versions No fix listed
redhat/3scale-amp2/toolbox-rhel9(Red Hat:3scale:2.13) All versions No fix listed
redhat/ruby(Red Hat:enterprise_linux:10) All versions No fix listed
redhat/ruby4.0(Red Hat:enterprise_linux:10) All versions No fix listed
redhat/ubi10/ruby-33(Red Hat:enterprise_linux:10) All versions No fix listed
redhat/ubi10/ruby-40(Red Hat:enterprise_linux:10) All versions No fix listed
redhat/ruby(Red Hat:rhel_els:6) All versions No fix listed
redhat/ruby(Red Hat:rhel_els:7) All versions No fix listed
redhat/ruby:2.5/ruby(Red Hat:enterprise_linux:8) All versions No fix listed
redhat/ruby:3.3/ruby(Red Hat:enterprise_linux:8) All versions No fix listed
redhat/ubi8/ruby-33(Red Hat:enterprise_linux:8) All versions No fix listed
redhat/ruby(Red Hat:enterprise_linux:9) All versions No fix listed
redhat/ruby:3.3/ruby(Red Hat:enterprise_linux:9) All versions No fix listed
redhat/ruby:4.0/ruby(Red Hat:enterprise_linux:9) All versions No fix listed
Show 25 more
ProductAffected versionsFixed in
redhat/ubi9/ruby-30(Red Hat:enterprise_linux:9) All versions No fix listed
redhat/ubi9/ruby-33(Red Hat:enterprise_linux:9) All versions No fix listed
redhat/ubi9/ruby-40(Red Hat:enterprise_linux:9) All versions No fix listed
debian/ruby3.1(Debian:12) All versions No fix listed
debian/ruby3.1(Debian:12) = 3.1.2-7 No fix listed
debian/ruby3.1(Debian:12) = 3.1.2-7+deb12u1 No fix listed
debian/ruby3.1(Debian:12) = 3.1.2-7+hurd.1 No fix listed
debian/ruby3.1(Debian:12) = 3.1.2-8 No fix listed
debian/ruby3.1(Debian:12) = 3.1.2-8.1~exp1 No fix listed
debian/ruby3.1(Debian:12) = 3.1.2-8.3 No fix listed
debian/ruby3.1(Debian:12) = 3.1.2-8.4 No fix listed
debian/ruby3.1(Debian:12) = 3.1.2-8.5 No fix listed
debian/ruby3.3(Debian:13) < 3.3.13-0+deb13u1 3.3.13-0+deb13u1
debian/ruby3.3(Debian:13) = 3.3.8-2 No fix listed
debian/ruby3.3(Debian:13) = 3.3.8-2.1 No fix listed
debian/ruby3.3(Debian:13) = 3.3.8-2.2 No fix listed
debian/ruby3.3(Debian:14) All versions No fix listed
debian/ruby3.3(Debian:14) = 3.3.8-2 No fix listed
debian/ruby3.3(Debian:14) = 3.3.8-2.1 No fix listed
debian/ruby3.3(Debian:14) = 3.3.8-2.2 No fix listed
alpine/ruby(Alpine:v3.21) < 3.3.13-r0 3.3.13-r0
alpine/ruby(Alpine:v3.22) < 3.4.12-r0 3.4.12-r0
alpine/ruby(Alpine:v3.23) < 3.4.12-r0 3.4.12-r0
alpine/ruby(Alpine:v3.24) < 3.4.12-r0 3.4.12-r0
azure linux ruby(Azure Linux:4.0) < 0:3.4.10-36.azl4 0:3.4.10-36.azl4

References