ruby/resolv · Security
resolv vulnerable to DoS via insufficient DNS domain name length validation
- GHSA ID
- GHSA-xh69-987w-hrp8
- CVE ID
- CVE-2025-24294
- Severity
- medium
- Published
- Updated
- CVSS
- 5.3 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- CVSS v3
- 5.3 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- CVSS v4
- 6.6 · 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
Description
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)
CWEs
- CWE-400 · Uncontrolled Resource Consumption
- CWE-1284 · Improper Validation of Specified Quantity in Input
References
- https://nvd.nist.gov/vuln/detail/CVE-2025-24294 ↗
- https://github.com/ruby/resolv/commit/4c2f71b5e80826506f78417d85b38481c058fb25 ↗
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/resolv/CVE-2025-24294.yml ↗
- https://www.ruby-lang.org/en/news/2025/07/08/dos-resolv-cve-2025-24294 ↗
- https://github.com/advisories/GHSA-xh69-987w-hrp8 ↗