CVE-2025-24294

7.5 HIGH

📋 TL;DR

This vulnerability allows attackers to cause denial of service by sending specially crafted DNS packets with highly compressed domain names. When parsed by Ruby's resolv library, these packets trigger excessive CPU consumption, making applications unresponsive. This affects any Ruby application using the resolv library for DNS resolution.

💻 Affected Systems

Products:
  • Ruby
Versions: Ruby 3.2.0 through 3.2.6, Ruby 3.3.0 through 3.3.4, Ruby 3.4.0 through 3.4.1
Operating Systems: All operating systems running affected Ruby versions
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects applications using Ruby's resolv library for DNS resolution. Applications using alternative DNS libraries or not performing DNS resolution are not affected.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete service outage where affected Ruby applications become unresponsive, requiring restart and potentially causing cascading failures in dependent services.

🟠

Likely Case

Degraded performance or temporary unavailability of Ruby applications processing DNS queries, particularly affecting services with high DNS resolution needs.

🟢

If Mitigated

Minimal impact with proper rate limiting, network filtering, and updated libraries preventing malicious packets from reaching vulnerable systems.

🌐 Internet-Facing: HIGH - Internet-facing services using Ruby DNS resolution are directly exposed to crafted packets from any source.
🏢 Internal Only: MEDIUM - Internal systems could be targeted by compromised internal hosts or through lateral movement, but require attacker foothold.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires sending crafted DNS packets to vulnerable systems, which is straightforward for attackers with network access. No authentication required.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Ruby 3.2.7, Ruby 3.3.5, Ruby 3.4.2

Vendor Advisory: https://www.ruby-lang.org/en/news/2025/07/08/dos-resolv-cve-2025-24294/

Restart Required: Yes

Instructions:

1. Update Ruby to patched version using your package manager or Ruby version manager. 2. For Ruby 3.2.x: Update to 3.2.7. 3. For Ruby 3.3.x: Update to 3.3.5. 4. For Ruby 3.4.x: Update to 3.4.2. 5. Restart all Ruby applications and services.

🔧 Temporary Workarounds

Network filtering for DNS packets

all

Block or rate limit incoming DNS packets at network perimeter to prevent malicious packets from reaching vulnerable systems.

Use alternative DNS resolution

all

Configure applications to use alternative DNS libraries or services not based on Ruby's resolv library.

🧯 If You Can't Patch

  • Implement strict rate limiting on DNS queries at application or network level
  • Deploy network monitoring to detect and block anomalous DNS traffic patterns

🔍 How to Verify

Check if Vulnerable:

Check Ruby version with 'ruby --version'. If version is between 3.2.0-3.2.6, 3.3.0-3.3.4, or 3.4.0-3.4.1, system is vulnerable if using resolv library.

Check Version:

ruby --version

Verify Fix Applied:

After updating, verify with 'ruby --version' shows 3.2.7, 3.3.5, or 3.4.2 or higher. Test DNS resolution functionality remains operational.

📡 Detection & Monitoring

Log Indicators:

  • Unusual CPU spikes in Ruby processes
  • Increased DNS query timeouts
  • Application restarts due to unresponsiveness

Network Indicators:

  • High volume of DNS queries to Ruby applications
  • DNS packets with unusual compression patterns

SIEM Query:

source="ruby_app_logs" AND ("CPU 100%" OR "unresponsive" OR "DNS timeout")

🔗 References

📤 Share & Export