Register for the AI for Security Summit: Join Figma, Perplexity & Wiz

CVE-2026-80213
Ruby vulnerability analysis and mitigation

Overview

CVE-2026-80213 is a numeric truncation error (CWE-197) in the Ruby resolv gem that allows unauthenticated attackers to bypass hostname allowlist and SSRF protections by supplying oversized DNS labels. The vulnerability affects resolv gem versions before 0.3.2 and versions 0.4.0 through 0.7.1; version 0.7.2 contains the fix. It was disclosed on August 27, 2026, via the Ruby security advisory and the GitHub Advisory Database. The CVSS v3.1 base score is 4.0 (Medium) (Ruby Advisory, GitHub Advisory).

Technical details

The root cause is a numeric truncation error (CWE-197) in Resolv::DNS::MessageEncoder. The put_string method packed a DNS label's length using put_pack("C", d.length), which stores only the low 8 bits of the length value — so a label longer than 255 octets has its length stored modulo 256, while the full label data is written to the wire unchanged. RFC 1035 §2.3.4 limits labels to 63 octets and reserves the two high bits of the length octet for compression pointers (0xC0–0xFF range), but neither put_label nor Resolv::DNS::Name.create validated per-label or total name length. As a result, an attacker-controlled hostname passed to the encoder produces wire bytes that name a different domain than the application intended — a suffix the application validated against an allowlist becomes padding that never appears on the wire, enabling allowlist and SSRF egress bypass (Ruby Advisory, GitHub Advisory).

Impact

An unauthenticated attacker who can supply a hostname to a Ruby application using the vulnerable resolv gem can cause the application to resolve and connect to an unapproved domain or internal resource, effectively bypassing SSRF protections and hostname allowlists. The recursive resolver caches the response under the attacker's chosen name, and DNS logs record that name rather than the one the application requested, complicating forensic analysis. Confidentiality and availability impacts are rated None; the primary impact is low integrity — specifically, unauthorized access to restricted internal resources or external domains the application should not reach (Ruby Advisory, GitHub Advisory).

Exploitability

There is no known public proof-of-concept exploit and no evidence of in-the-wild exploitation as of the disclosure date. The NVD SSVC assessment rates exploitation as "none" and automation as "no," reflecting the high attack complexity required. The EPSS score is approximately 0.32% (28th percentile), indicating a low near-term exploitation probability. CVE-2026-80213 is not listed in the CISA Known Exploited Vulnerabilities catalog (GitHub Advisory, Ruby Advisory).

Exploitation steps

  1. Identify a target application: Find a Ruby application that uses the resolv gem (versions < 0.3.2 or 0.4.0–0.7.1) to resolve attacker-supplied hostnames and enforces an allowlist or SSRF filter based on the hostname string.
  2. Craft an oversized hostname: Construct a hostname where one or more labels exceed 63 octets (up to 255+ octets). Append the allowlisted suffix (e.g., allowed.example.com) after the oversized label so the application's string-based validation passes.
  3. Submit the hostname to the application: Provide the crafted hostname through any user-controlled input that the application resolves via Resolv::DNS (e.g., a URL field, webhook endpoint, or API parameter).
  4. Trigger DNS encoding: The application calls Resolv::DNS::Name.create and the encoder, which truncates the label length modulo 256. The allowlisted suffix becomes padding that is never encoded on the wire; the DNS query resolves the attacker's chosen domain instead.
  5. Achieve SSRF or allowlist bypass: The application connects to the attacker-controlled or internal domain, bypassing egress controls. The recursive resolver caches the attacker's name, and DNS logs reflect the attacker's domain rather than the intended one (Ruby Advisory, GitHub Advisory).

Indicators of compromise

  • Network: Outbound DNS queries from the application server containing labels exceeding 63 octets; DNS queries resolving to unexpected or internal IP addresses not matching the intended allowlisted domain.
  • Logs: Application DNS resolution logs showing a resolved hostname that differs from the hostname string submitted by the user; recursive resolver cache entries for unexpected domain names.
  • Application Behavior: HTTP or TCP connections from the Ruby application to internal network ranges or unapproved external domains following a user-supplied hostname input; discrepancies between the hostname string in application logs and the domain name recorded in DNS server logs.

Mitigation and workarounds

Upgrade the Ruby resolv gem to version 0.7.2 or later, which adds proper per-label and total name length validation before encoding. Affected version ranges are < 0.3.2 and 0.4.0–0.7.1. As a defense-in-depth measure, validate hostname length against DNS standards (maximum 253 characters total, 63 per label) at the application layer before passing to the resolver, and perform runtime validation of resolved IP addresses against approved ranges rather than relying solely on hostname string matching (Ruby Advisory, GitHub Advisory).

Community reactions

The Ruby security team published a joint advisory covering CVE-2026-80212 and CVE-2026-80213 on August 27, 2026, and released the patched resolv gem 0.7.2 simultaneously. AusCERT issued bulletin ESB-2026.10118 referencing the advisory, and Red Hat issued a security advisory for affected hardened image RPMs. No significant independent researcher commentary or social media discussion has been observed beyond standard vulnerability tracking (Ruby Advisory).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

RHEL / CentOS

Affected

RHEL 8

ruby:2.5/ruby.src

Affected

RHEL 9

ruby.src

Affected

RHEL 10

ruby.src

Affected

SourceThis report was generated using AI

Related Ruby vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-50276HIGH7.5
  • Ruby logoRuby
  • datadog
NoYesSep 14, 2026
CVE-2026-70658HIGH7.4
  • Ruby logoRuby
  • pay
NoNoSep 14, 2026
CVE-2026-44163MEDIUM5.3
  • Ruby logoRuby
  • fluent-plugin-opentelemetry
NoYesSep 15, 2026
CVE-2026-44282MEDIUM4.8
  • Ruby logoRuby
  • decidim-elections
NoYesSep 15, 2026
CVE-2026-44162LOW2.7
  • Ruby logoRuby
  • kube-logging-operator
NoYesSep 14, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management