Vulnerabilities in pkg:gem/resolv

PACKAGE
Advisory Identifier: GHSA-xh69-987w-hrp8
Advisory Summary

CVE-2025-24294 is a MODERATE (CVSS 5.3) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Resolv libraries in the RubyGems ecosystem. The issue involves resolv vulnerable to dos via insufficient dns domain name length validation. Remediation is available by upgrading affected packages to version 0.2.3, 0.6.2, 0.3.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:gem/resolv

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:gem/resolv. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-xh69-987w-hrp8 CVE-2025-24294 MODERATE resolv vulnerable to DoS via insufficient DNS domain name length validation

CVE-2025-24294 at a Glance

CVE Identifier CVE-2025-24294
GHSA Identifier GHSA-xh69-987w-hrp8
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Resolv
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2025-24294

To remediate this vulnerability, upgrade all affected Resolv dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

resolv fixed: 0.2.3
Upgrade resolv to 0.2.3
resolv fixed: 0.6.2
Upgrade resolv to 0.6.2
resolv fixed: 0.3.1
Upgrade resolv to 0.3.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for resolv

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-24294, inspect your project dependencies for Resolv:

inspect dependencies for resolv

Analyze the terminal output to locate any version of Resolv in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.2.3), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Resolv, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A denial of service vulnerability has been discovered in the resolv gem bundled with Ruby. ## Details The vulnerability is caused by an insufficient check on the length of a decompressed domain name within a DNS packet. An attacker can craft a malicious DNS packet containing a highly compressed domain name. When the resolv library parses such a packet, the name decompression process consumes a large amount of CPU resources, as the library does not limit the resulting length of the name. This resource consumption can cause the application thread to become unresponsive, resulting in a Denial of Service condition. ## Affected Version The vulnerability affects the resolv gem bundled with the following Ruby series: * Ruby 3.2 series: resolv version 0.2.2 and earlier * Ruby 3.3 series: resolv version 0.3.0 * Ruby 3.4 series: resolv version 0.6.1 and earlier ## Credits Thanks to Manu for discovering this issue. ## History Originally published at 2025-07-08 07:00:00 (UTC)

CVE-2025-24294 Affected Resolv Versions

3 component(s)
Fixed Versions:
0.2.30.6.20.3.1
Product / Package Ecosystem Affected Versions Fixed Version
resolv
RubyGems
< 0.2.3
0.2.3
resolv
RubyGems
≥ 0.4.0
< 0.6.2
0.6.2
resolv
RubyGems
≥ 0.3.0
< 0.3.1
0.3.1

References

Frequently Asked Questions

What is CVE-2025-24294?
CVE-2025-24294 is a security vulnerability in Resolv involving resolv vulnerable to DoS via insufficient DNS domain name length validation under CWE-400: Uncontrolled Resource Consumption.
Which Resolv versions are affected?
Affected versions include releases prior to 0.2.3, 0.6.2, 0.3.1 across affected packages: resolv.
What version fixes CVE-2025-24294?
Upgrading to 0.2.3, 0.6.2, 0.3.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is resolv affected?
Yes, resolv is affected in releases prior to 0.2.3, 0.6.2, 0.3.1. Upgrade your dependency to 0.2.3, 0.6.2, 0.3.1 or later.
What is the CVSS score of CVE-2025-24294?
CVE-2025-24294 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2025-24294?
CVE-2025-24294 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check RubyGems dependencies for CVE-2025-24294?
Run the dependency tree command: 'inspect dependencies for resolv'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-xh69-987w-hrp8",
  "modified" : "2025-07-15T22:56:19Z",
  "published" : "2025-07-15T14:37:08Z",
  "aliases" : [ "CVE-2025-24294" ],
  "summary" : "resolv vulnerable to DoS via insufficient DNS domain name length validation",
  "details" : "A denial of service vulnerability has been discovered in the resolv gem bundled with Ruby.\n\n## Details\nThe vulnerability is caused by an insufficient check on the length of a decompressed domain name within a DNS packet.\n\nAn attacker can craft a malicious DNS packet containing a highly compressed domain name. When the resolv library parses such a packet, the name decompression process consumes a large amount of CPU resources, as the library does not limit the resulting\nlength of the name.\n\nThis resource consumption can cause the application thread to become unresponsive, resulting in a Denial of Service condition.\n\n## Affected Version\nThe vulnerability affects the resolv gem bundled with the following Ruby series:\n* Ruby 3.2 series: resolv version 0.2.2 and earlier\n* Ruby 3.3 series: resolv version 0.3.0\n* Ruby 3.4 series: resolv version 0.6.1 and earlier\n\n## Credits\nThanks to Manu for discovering this issue.\n\n## History\nOriginally published at 2025-07-08 07:00:00 (UTC)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:U"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "resolv"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.2.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "resolv"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.4.0"
      }, {
        "fixed" : "0.6.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "resolv"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.3.0"
      }, {
        "fixed" : "0.3.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-24294"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ruby/resolv/commit/4c2f71b5e80826506f78417d85b38481c058fb25"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ruby/resolv"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/resolv/CVE-2025-24294.yml"
  }, {
    "type" : "WEB",
    "url" : "https://www.ruby-lang.org/en/news/2025/07/08/dos-resolv-cve-2025-24294"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1284", "CWE-400" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-07-15T14:37:08Z",
    "nvd_published_at" : "2025-07-12T04:15:46Z"
  }
}