Description
An issue was discovered in the resolv gem before 0.7.2 for Ruby. Resolv::DNS::Resource.get_class, Resolv::DNS::Resource::Generic.create, and Resolv::DNS::SvcParam::Generic.create generate a new class for each unknown DNS resource record (type, class) pair, or each unknown SvcParamKey, encountered while decoding a response. Each generated class was permanently registered both as a constant on Resource (or SvcParam::Generic) and as an entry in a class-lookup hash (ClassHash), and thus the class remained reachable through that constant after the response was discarded. Type and class are each 16-bit values, and thus an attacker controlling DNS responses (a spoofed response, or a malicious or hijacked upstream DNS server) has roughly 2^32 distinct (type, class) pairs to choose from. A single response of a few hundred kilobytes carrying tens of thousands of distinct unknown types permanently grows process memory by tens of megabytes; repeated responses accumulate without bound and are never reclaimed by garbage collection, because the constant keeps each class alive. Any code path that calls Resolv::DNS::Message.decode on attacker-influenced DNS responses is affected. resolv is a default gem, and thus this is reachable from a plain Ruby installation without any additional dependency.
Published: 2026-08-27
Score: 7.5 High
EPSS: < 1% Very Low
KEV: No
Impact: Denial of Service via unbounded memory growth
Action: Patch Now
AI Analysis

Impact

The resolv gem creates a new class for every unknown DNS record type or service parameter key it encounters while decoding a response. Each generated class is permanently registered as a constant and stored in a lookup hash, keeping it alive even after the response is discarded. An attacker who controls DNS responses can supply thousands of unknown types, causing the process to consume tens of megabytes of memory per response and accumulate memory usage without release. This leads to resource exhaustion and can bring the Ruby process to a halt, presenting a denial-of-service threat. The weakness is a classic resource exhaustion issue (CWE‑770).

Affected Systems

This vulnerability affects the Ruby standard library gem “resolv” in all versions prior to 0.7.2. Because the gem is included by default in a Ruby installation, any Ruby application that processes DNS responses using Resolv::DNS::Message.decode on untrusted data is affected. The issue is vendor‑agnostic but applies to all Ruby deployments that have the default resolv gem available.

Risk and Exploitability

The CVSS score of 7.5 places this vulnerability in the high severity range. While no EPSS score is reported, the attack surface is significant: an attacker who can influence DNS traffic—through a spoofed responder, a hijacked upstream server, or by directly injecting responses into a Ruby process—can trigger the exploit. The vulnerability is listed outside of the CISA KEV catalog, and no indication of active exploitation is known. The class generation has no built‑in garbage collection protection, making repeated crafted responses a reliable way to exhaust memory. The security risk is therefore high for any Ruby environment that accepts untrusted DNS data and does not constrain the size or content of DNS responses.

Generated by OpenCVE AI on August 27, 2026 at 18:48 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the resolv gem to version 0.7.2 or later to remove the dynamic class creation logic
  • If upgrading is not immediately possible, isolate DNS resolution to a trusted process or library that does not expose unbounded class creation, and avoid decoding attacker‑controlled DNS responses
  • Implement application or infrastructure monitoring of memory usage to detect abnormal growth and trigger alerts or restarts

Generated by OpenCVE AI on August 27, 2026 at 18:48 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 01 Sep 2026 12:15:00 +0000

Type Values Removed Values Added
Title Unbounded Memory Growth via Dynamic Class Creation in Ruby resolv Gem resolv: resolv gem: Denial of Service via uncontrolled memory growth from crafted DNS responses
References
Metrics threat_severity

None

threat_severity

Important


Fri, 28 Aug 2026 16:45:00 +0000

Type Values Removed Values Added
First Time appeared Ruby
Ruby resolv
Vendors & Products Ruby
Ruby resolv

Thu, 27 Aug 2026 18:00:00 +0000

Type Values Removed Values Added
Title Unbounded Memory Growth via Dynamic Class Creation in Ruby resolv Gem

Thu, 27 Aug 2026 16:45:00 +0000

Type Values Removed Values Added
Description An issue was discovered in the resolv gem before 0.7.2 for Ruby. Resolv::DNS::Resource.get_class, Resolv::DNS::Resource::Generic.create, and Resolv::DNS::SvcParam::Generic.create generate a new class for each unknown DNS resource record (type, class) pair, or each unknown SvcParamKey, encountered while decoding a response. Each generated class was permanently registered both as a constant on Resource (or SvcParam::Generic) and as an entry in a class-lookup hash (ClassHash), and thus the class remained reachable through that constant after the response was discarded. Type and class are each 16-bit values, and thus an attacker controlling DNS responses (a spoofed response, or a malicious or hijacked upstream DNS server) has roughly 2^32 distinct (type, class) pairs to choose from. A single response of a few hundred kilobytes carrying tens of thousands of distinct unknown types permanently grows process memory by tens of megabytes; repeated responses accumulate without bound and are never reclaimed by garbage collection, because the constant keeps each class alive. Any code path that calls Resolv::DNS::Message.decode on attacker-influenced DNS responses is affected. resolv is a default gem, and thus this is reachable from a plain Ruby installation without any additional dependency.
Weaknesses CWE-770
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}


cve-icon MITRE

Status: PUBLISHED

Assigner: mitre

Published:

Updated: 2026-08-27T19:33:58.773Z

Reserved: 2026-08-26T01:42:16.295Z

Link: CVE-2026-80212

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Deferred

Published: 2026-08-27T17:20:50.880

Modified: 2026-09-09T16:04:24.933

Link: CVE-2026-80212

cve-icon Redhat

Severity : Important

Publid Date: 2026-08-27T14:15:04Z

Links: CVE-2026-80212 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-28T16:14:42Z

Weaknesses
  • CWE-770

    Allocation of Resources Without Limits or Throttling