# CVE-2025-24294: resolv vulnerable to DoS via insufficient DNS domain name length validation

> An attacker can cause a Denial of Service in applications using the Ruby resolv library by sending malicious DNS packets that trigger excessive CPU consumption during name decompression.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 12 Jul 2025
- **Updated:** 16 Jul 2025
- **Also known as:** AZL-65202, AZL-65241, BELL-CVE-2025-24294, CLSA-2026-1768209702, CLSA-2026-1768301582, DEBIAN-CVE-2025-24294, ECHO-1466-059c-a8c5, GHSA-xh69-987w-hrp8, MINI-7fjj-vcc4-w34p, MINI-gjmm-fr84-ghr5, MINI-v8p2-jv76-37m8, MINI-vq79-cj57-p6w6, MINI-wg6f-c62c-j3q8, MINI-xfhr-h966-q9qg, SUSE-SU-2025:3776-1, UBUNTU-CVE-2025-24294

## What is CVE-2025-24294?

CVE-2025-24294 is a high-severity denial of service vulnerability in Ruby resolv, published on 12 Jul 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

The attack vector is a potential Denial of Service (DoS). 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.

Weakness: CWE-400 (Uncontrolled Resource Consumption)

## Which versions are affected by CVE-2025-24294?

6 open source packages ship an affected version, including resolv.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `resolv` | RubyGems | All versions | 0.2.3 |
| `resolv` | RubyGems | All versions | 0.2.3 |
| `resolv` | RubyGems | From 0.3.0 | 0.3.1 |
| `resolv` | RubyGems | From 0.3.0 | 0.3.1 |
| `resolv` | RubyGems | From 0.4.0 | 0.6.2 |
| `resolv` | RubyGems | From 0.4.0 | 0.6.2 |
| `ruby2.5` | SUSE:Linux Enterprise Module for Basesystem 15 SP6 | All versions | 2.5.9-150000.4.54.1 |
| `ruby2.5` | openSUSE:Leap 15.6 | All versions | 2.5.9-150000.4.54.1 |

## How do I fix CVE-2025-24294?

Upgrade resolv to a fixed version for your release line: 0.2.3, 0.3.1 or 0.6.2.

## Is CVE-2025-24294 being exploited?

There is no known exploitation of CVE-2025-24294 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-24294 and fix it if it is affected.

What it is: CVE-2025-24294 is a high-severity denial of service vulnerability in Ruby resolv, published on 12 Jul 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-24294 in the wild and no public exploit code.

Affected packages and fixed versions:
- resolv (RubyGems): affected all versions; fixed in 0.2.3
- resolv (RubyGems): affected all versions; fixed in 0.2.3
- resolv (RubyGems): affected from 0.3.0; fixed in 0.3.1
- resolv (RubyGems): affected from 0.3.0; fixed in 0.3.1
- resolv (RubyGems): affected from 0.4.0; fixed in 0.6.2
- resolv (RubyGems): affected from 0.4.0; fixed in 0.6.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-24294/ (Markdown: https://insights.sbomify.com/CVE-2025-24294/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-24294
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-24294
- OSV: https://osv.dev/vulnerability/CVE-2025-24294

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-24294/
Summaries are generated and may contain mistakes; the official description above is the record.
