Skip to content
RedCVE

CVE-2026-80213Ruby Resolv vulnerability

RubyPublished:

CVSS score

4.0

Medium

CVSS 3.1 from mitre.org

Exploit probability (EPSS)

0.27%

0.27% chance of exploitation in the next 30 days, higher than 19.5% of all CVEs.

CISA KEV

Not in KEV

No confirmed exploitation reported by CISA so far.

Official 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.

Source: NVD · CNA: cve@mitre.org

How to fix it, step by step

  1. Check whether you're affected

    Find every system running Ruby Resolv and compare its version with the affected versions.

  2. Update to a fixed version

    • Update Resolv to 0.3.2, 0.7.2 or later, on the branch you run.
  3. Confirm the fix

    Check that every affected system now reports a fixed version, and recheck the vendor's advisory: fixes are sometimes revised.

Was this useful?

How it can be exploited

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Changed
Confidentiality
None
Integrity
Low
Availability
None

Values in red make the vulnerability easier to exploit or more damaging. CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N

Affected products

Affected productsVersions
Ruby Resolv< 0.3.2 · ≥ 0.4.0, < 0.7.2

Weakness

Timeline

  1. Published:
  2. Last modified:

Frequently asked questions

Is CVE-2026-80213 being exploited?

There is no confirmed exploitation in CISA's KEV catalog so far. Its EPSS score estimates a 0.3% probability of exploitation in the next 30 days.

What is the CVSS score of CVE-2026-80213?

CVE-2026-80213 has a CVSS 3.1 base score of 4.0 (medium).

Which versions are affected?

Ruby Resolv (< 0.3.2; ≥ 0.4.0, < 0.7.2)

Is there a patch for CVE-2026-80213?

The official record links to vendor advisories or patches; see “What to do” above.

References

Data: NVD, CVE.org (cvelistV5), CISA KEV and FIRST EPSS. Summary written by RedCVE with AI assistance from the official data.