CVE-2025-31498

c-ares has a use-after-free in read_answers()

HIGH
8.3
CVSS Score
Published: April 8, 2025 at 01:53 PM UTC
Updated: June 17, 2026 at 09:10 AM UTC
1 product affected across 1 vendorAres C Ares

Using c-ares by c-ares?

Get instant alerts when new vulnerabilities affect c-ares - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH8.3
Exploit prediction
EPSS 0.6%
SSVC
No known exploit

Description

c-ares is an asynchronous resolver library. From 1.32.3 through 1.34.4, there is a use-after-free in read_answers() when process_answer() may re-enqueue a query either due to a DNS Cookie Failure or when the upstream server does not properly support EDNS, or possibly on TCP queries if the remote closed the connection immediately after a response. If there was an issue trying to put that new transaction on the wire, it would close the connection handle, but read_answers() was still expecting the connection handle to be available to possibly dequeue other responses. In theory a remote attacker might be able to trigger this by flooding the target with ICMP UNREACHABLE packets if they also control the upstream nameserver and can return a result with one of those conditions, this has been untested. Otherwise only a local attacker might be able to change system behavior to make send()/write() return a failure condition. This vulnerability is fixed in 1.34.5.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 1.34.5
Affected range stops below 1.34.5, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet, and no fixed version or vendor advisory is recorded against it.

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

8.3HIGHGitHub_M
Vector?

Quick Info

StatusDEFERRED
CWE
CWE-416

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card