Skip to main content

Ruby resolv gem CVE-2026-80213

| EUVDEUVD-2026-67139 MEDIUM
Numeric Truncation Error (CWE-197)
2026-08-27 mitre GHSA-jr95-x3fr-rcg4
4.0
CVSS 3.1 · Vendor: mitre
Share

Severity by source

Vendor (mitre) PRIMARY
4.0 MEDIUM
AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N
vuln.today AI
4.0 MEDIUM

AC:H reflects requirement for attacker-controlled hostname input reaching the encoder; S:C captures DNS resolver cache and audit log integrity impact on external systems.

3.1 AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N

Primary rating from Vendor (mitre).

CVSS VectorVendor: mitre

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N
Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
None
Integrity
Low
Availability
None

Lifecycle Timeline

2
Analysis Generated
Aug 27, 2026 - 18:18 vuln.today
Patch available
Aug 27, 2026 - 18:02 EUVD

DescriptionCVE.org

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.

AnalysisAI

DNS label length truncation in the Ruby resolv gem (versions before 0.7.2 and before 0.3.2) enables attacker-controlled hostnames to produce wire-format DNS queries naming a domain the attacker chose rather than the one the application intended. The flaw allows hostname allowlists and DNS egress controls to be silently bypassed - the validated string appears legitimate but the bytes transmitted to the recursive resolver describe a different name. …

Unlock full vulnerability intelligence

  • Risk assessment & exploitation conditions
  • Attack chain visualization
  • Remediation with exact patch versions
  • Threat intelligence from 22 sources
  • Personal watchlist & email alerts

Free forever · No credit card required

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata

Access
Supply oversized DNS label as hostname input
Delivery
Application validates hostname string against allowlist
Exploit
Resolv truncates label length to compression-pointer byte range
Execution
Wire-format DNS query names attacker-chosen domain
Persist
Recursive resolver resolves and caches attacker's domain
Impact
Allowlist and egress controls bypassed, audit logs record attacker's domain

Vulnerability AssessmentAI

Exploitation Exploitation requires that an attacker control or inject a hostname string that the vulnerable application passes to Resolv::DNS for resolution without prior per-label length validation - for example, via a user-supplied URL, webhook target, SSRF-triggering parameter, redirect destination, or externally-sourced configuration value. … Additional conditions and limiting factors are described in the full assessment.
Risk Assessment The CVSS 3.1 base score of 4.0 (Medium) with vector AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N is consistent with the actual threat model. … Full risk analysis with EPSS, KEV, and SSVC signal comparison available after sign-in.
Exploit Scenario An attacker submits a webhook URL or SSRF-triggering parameter containing a crafted hostname whose primary label exceeds 63 octets with a total byte length that, when truncated to a single octet, falls in the 0xC0-0xFF compression-pointer range. The application validates the full hostname string against an allowlist (e.g., asserting it ends with .trusted.example.com) and passes it to Resolv::DNS - the validating suffix appears in the string but never reaches the wire, where the truncated length byte causes a conforming resolver to follow a compression pointer to a different, attacker-controlled domain. …
Remediation Upgrade the resolv gem to version 0.7.2 (or 0.3.2 for installations on the older branch) as documented in the vendor advisory at https://www.ruby-lang.org/en/news/2026/08/27/multiple-vulnerabilities-in-resolv/. … Detailed patch versions, workarounds, and compensating controls in full report.

Threat intelligence, references, and detailed analysis are available after sign-in.

Share

CVE-2026-80213 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy