Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2026-80213

MEDIUM 4.0EPSS 21%

An issue was discovered in the resolv gem before 0.7.2 for Ruby. Resolv::DNS::MessageEncoder wrote a DNS label's length…

Mitigation

  • Upgrade resolv to 0.7.2 or later.

Who should check

  • Anyone running Ruby resolv < 0.3.2; >= 0.4.0, < 0.7.2

Vulnerability facts

Affected
Ruby resolv < 0.3.2; >= 0.4.0, < 0.7.2
Fixed in
Ruby resolv 0.3.2, Ruby resolv 0.7.2
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Remote, no login needed
CVSS
4.0 (v3.1, CNA)CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack vector: Network
  • Attack complexity: High
  • Privileges required: None
  • User interaction: None
  • Scope: Changed (impact reaches other components)
  • Confidentiality impact: None
  • Integrity impact: Low
  • Availability impact: None
EPSS
0.35% chance of exploitation in 30 days (percentile 21, 2026-11-26)
CWE
CWE-197
Published
Modified

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 and fixed versions

Package / productAffectedFixedSource
Ruby resolv< 0.3.2; >= 0.4.0, < 0.7.2—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2026-80213. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-80213.md
Affected: Ruby resolv < 0.3.2; >= 0.4.0, < 0.7.2
Fixed in: Ruby resolv 0.3.2, Ruby resolv 0.7.2

Steps:
1. Search this machine and project for Ruby resolv: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2026-80213 being exploited?

There is no confirmed exploitation: CVE-2026-80213 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.35% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2026-80213?

Medium: CVSS 4.0 (v3.1, scored by CNA). Remote, no login needed. The attack needs conditions outside the attacker's control, which makes it harder.

Which versions are affected by CVE-2026-80213?

Ruby resolv < 0.3.2; >= 0.4.0, < 0.7.2.

Is there a fix for CVE-2026-80213?

Yes. Fixed in Ruby resolv 0.3.2, Ruby resolv 0.7.2. Upgrade resolv to 0.7.2 or later.

How do I check if I'm affected by CVE-2026-80213?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors