Use After Free Affecting c-ares package, versions [1.32.3,1.34.5)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.15% (37th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Use After Free vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-CONAN-CARES-10185672
  • published20 May 2025
  • disclosed8 Apr 2025
  • creditErik Lax

Introduced: 8 Apr 2025

CVE-2025-31498  (opens in a new tab)
CWE-416  (opens in a new tab)

How to fix?

Upgrade c-ares to version 1.34.5 or higher.

Overview

Affected versions of this package are vulnerable to Use After Free due to the read_answers process by flooding the target with ICMP UNREACHABLE packets under specific network conditions.

Note: This is only exploitable remotely if the attacker also controls the upstream nameserver and can return a result that triggers the re-enqueue of a query. Otherwise only a local attacker might be able to change system behavior to make send() or write() return a failure condition.

CVSS Base Scores

version 4.0
version 3.1