CVE-2026-80213
published medium CVSS 3.1 · 4.0resolv: Resolv gem: DNS allowlist and egress bypass, and cache poisoning via crafted hostnames
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Ruby | — | resolv0 to < 0.3.2 · 0.4.0 to < 0.7.2 · Other versions: unaffected | Affected | Not stated | mitre |
| Amazon Linux | AL2 | Release evaluation | No Fix Planned | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | No Fix Planned | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluationALAS2023-2026-2144 | Fixed | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluationALAS2023-2026-2145 | Fixed | Not stated | Amazon Linux assessment |
| Alpine Linux | edge | ruby | Fixed | 3.4.12-r0 | Package fix record |
| Debian | trixie | ruby3.3 | Advisory build | 3.3.13-0+deb13u1 | DSA-6614-1 |
| Amazon Linux | AL2023 | ruby3.4aarch64 | Listed in advisory | Not stated | ALAS2023-2026-2145 |
Show 12 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Alpine Linux | edge | ruby | Fixed | 4.0.10-r0 | Package fix record |
| Alpine Linux | v3.21 | ruby | Fixed | 3.3.13-r0 | Package fix record |
| Alpine Linux | v3.22 | ruby | Fixed | 3.4.12-r0 | Package fix record |
| Alpine Linux | v3.23 | ruby | Fixed | 3.4.12-r0 | Package fix record |
| Alpine Linux | v3.24 | ruby | Fixed | 3.4.12-r0 | Package fix record |
| Amazon Linux | AL2023 | ruby3.4noarch | Listed in advisory | Not stated | ALAS2023-2026-2145 |
| Amazon Linux | AL2023 | ruby3.4src | Listed in advisory | Not stated | ALAS2023-2026-2145 |
| Amazon Linux | AL2023 | ruby3.4x86_64 | Listed in advisory | Not stated | ALAS2023-2026-2145 |
| Amazon Linux | AL2023 | ruby4.0aarch64 | Listed in advisory | Not stated | ALAS2023-2026-2144 |
| Amazon Linux | AL2023 | ruby4.0noarch | Listed in advisory | Not stated | ALAS2023-2026-2144 |
| Amazon Linux | AL2023 | ruby4.0src | Listed in advisory | Not stated | ALAS2023-2026-2144 |
| Amazon Linux | AL2023 | ruby4.0x86_64 | Listed in advisory | Not stated | ALAS2023-2026-2144 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 4.0 / 10
- Severity
- medium
- Provider
- mitre · cna
- Vector string
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N
- Scenarios
- en: GENERAL
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Ruby | resolv | 0 to < 0.3.2 (affected · semver)0.4.0 to < 0.7.2 (affected · semver)Default: unaffected | mitre · cna |
Weaknesses
1- CWE-197 CWE-197 Numeric Truncation Error
References
2Provider assertions
2mitre · cna
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- e82d113229a1917d695c197f6f1aae0904129523ebf3594c4a7ec7edcde5cd68
- Ingested
- 23 Sep 2026, 09:34:17 UTC
- Source record
- Official CVE record