CVE-2026-80213: Medium severity rubygems/resolv vulnerability

Published Aug 27, 2026
·
Updated

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. putstring packed the length with putpack("C", d.length) and putlabel 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 domai

Affected Software

9 affected componentsFixes available
rubygems/resolv<0.7.2
debian/ruby3.1*
debian/ruby3.3<3.3.13-0+deb13u1
3.3.13-0+deb13u1
debian/ruby3.3*
IBM API Connect<=V10.0.8.0 - V10.0.8.13
All of the following
azurelinux/ruby<0:3.4.10-36.azl4
0:3.4.10-36.azl4
Microsoft Azure Linux=4.0
debian/ruby3.1<=3.1.2-7+deb12u1, <=3.1.7+really3.1.2-0+deb12u1
debian/ruby3.3<=3.3.8-2, <=3.3.8-2.2
3.3.13-0+deb13u13.3.14-0.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/ruby3.3 to a version that resolves this vulnerability.

    Fixed in 3.3.13-0+deb13u1
  2. Upgrade

    Upgrade azurelinux/ruby to a version that resolves this vulnerability.

    Fixed in 0:3.4.10-36.azl4
  3. Upgrade

    Upgrade debian/ruby3.3 to a version that resolves this vulnerability.

    Fixed in 3.3.13-0+deb13u1Fixed in 3.3.14-0.1
  4. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 0.7.2

Event History

Aug 27, 2026
CVE Published
via MITRE·02:22 PM
Data Sourced
via MITRE·02:22 PM
DescriptionSeverityWeakness
Data Sourced
via Red Hat·04:52 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·05:20 PM
DescriptionSeverityWeakness
Data Sourced
via OSV·05:20 PM
DescriptionSeverityAffected Software
Aug 31, 2026
Data Sourced
via Microsoft·09:03 PM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·09:03 PM
Affected Software
Nov 18, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

Which applications are exposed to this issue?

Applications using the resolv gem before 0.7.2 are exposed when they pass an attacker-controlled hostname to DNS resolution. The relevant path is Resolv::DNS::MessageEncoder encoding that hostname into a DNS query.

2

What does an attacker need to exploit the issue?

An attacker needs to control a hostname that the application will attempt to resolve. By supplying a label longer than 255 octets, the attacker can cause the encoded DNS query to describe a different domain name from the hostname the application processed.

3

Can hostname allowlists or DNS egress controls be bypassed?

Yes. A validated hostname suffix can become padding that is not present in the DNS wire representation, allowing a query for an attacker-chosen domain despite an application-side suffix allowlist or egress check.

4

What can be done before updating?

Reject DNS labels longer than 63 octets before they reach resolution, consistent with RFC 1035. Do not rely solely on suffix validation where attacker-controlled hostnames can be resolved; ensure the name permitted by policy is the name sent in the DNS request.

5

How can teams assess whether they are affected?

Check whether the application uses a resolv gem version before 0.7.2 and whether any untrusted input can influence hostnames submitted for DNS resolution. Pay particular attention to controls that validate hostnames by appending or checking an allowlisted suffix.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203