CVE-2025-31498
c-ares has a use-after-free in read_answers()
No known exploitation. EPSS puts it in the 45th percentile. A vendor fix is available.
What to do
The vendor has published a fix. Version details are below where the sources state them.
What it is
From the CVE record
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.
In plain language
No plain-language summary for this CVE yet.
Exploitation
Where each signal puts this CVE on the scale from published to confirmed exploited.
- CISA KEV
Not in the catalog. CISA has not confirmed exploitation.
- Public exploits
No public exploit or proof of concept found in the sources we track.
- EPSS
0.6% chance of exploitation activity in the next 30 days, which ranks it in the 45th percentile of scored CVEs.
Exploit Prediction Scoring System, FIRST.org. A probability, not a confirmation.
Lifecycle
6 events over 443 days, from the signal feeds we watch.
- OpenVAS check added
- Patch availablepublished, weakness classified, att&ck mapped, record updated
Affected products
Technical detail
CVSS 3.1 vector
Open in the CVSS calculatorAV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:H
Scored 7.0 by bdu.
How it is reached
- Access Vector NetworkExploitable remotely over the network
- Access Complexity HighSpecialized conditions required
Impact if exploited
- Confidentiality L
- Integrity L
- Availability H
Weaknesses
ATT&CK techniques
Mapped from the weaknesses above (CWE to ATT&CK), not observed in attacks.
- Initial AccessT1190Exploit Public-Facing Applicationhigh confidence
- Privilege EscalationT1068Exploitation for Privilege Escalationhigh confidence
Sources
References in the record
- github.com/c-ares/c-ares/security/advisories/GHSA-6hxc-62jh-p29v
- github.com/c-ares/c-ares/pull/821
- github.com/c-ares/c-ares/commit/29d38719112639d8c0ba910254a3dd4f482ea2d1
And 2 more references. See all after sign-in
Watch the software you run.
My Stack ranks new CVEs for your products by real-world exploitation, so the next serious one reaches you without reading every advisory.
We'll flag the next CVE, public exploit or patch for C-ares, not every advisory.
A free account adds
- The full version matrix and every affected product
- Exploit links, proofs of concept and Metasploit modules
- Email alerts for the products you watch
- The same data over REST API, MCP and CLI