CVE-2025-31498: c-ares Use After Free
Vulnerability summary
CVE-2025-31498 is a high (CVSS 8.3) Use After Free vulnerability in c-ares. EPSS estimates a 0.59% chance of exploitation in the next 30 days, higher than 47.1% of scored vulnerabilities.
Advisory lineage
Upstream 0 · Downstream 5 · Related 3Timeline
- 08-04-2025PublishedVulnerability first disclosed.
- 08-04-2025Last modifiedVulnerability information updated.
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.
CVSS metrics
6 scores · 6 sources · 2 versions- OSV · AlpineEcosystem advisory · calculated8.3HighCVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- OSV · UbuntuEcosystem advisory · calculated8.3HighCVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N
- OSV · DebianEcosystem advisory · calculated8.3HighCVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- NVDNIST8.3HighCVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
EPSS trend
Probability
0.59%
Chance of exploitation in the next 30 days
Percentile
47%
Versus all other CVEs
30-day change
+0.01 pp
From 0.58% on 19-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Redhat16 products
- nodejs< 1:20.19.1-1.module+el8.10.0+23054+5431297f | < 1:20.19.1-1.module+el9.6.0+23053+4195b0b2 | < 1:22.15.0-1.el10_0 | < 1:20.18.2-2.module+el9.4.0+23089+aaa18a20
- nodejs-debuginfo< 1:20.19.1-1.module+el8.10.0+23054+5431297f | < 1:20.19.1-1.module+el9.6.0+23053+4195b0b2 | < 1:22.15.0-1.el10_0 | < 1:20.18.2-2.module+el9.4.0+23089+aaa18a20
- nodejs-debugsource< 1:20.19.1-1.module+el8.10.0+23054+5431297f | < 1:20.19.1-1.module+el9.6.0+23053+4195b0b2 | < 1:20.18.2-2.module+el9.4.0+23089+aaa18a20
- nodejs-devel< 1:20.19.1-1.module+el8.10.0+23054+5431297f | < 1:20.19.1-1.module+el9.6.0+23053+4195b0b2 | < 1:22.15.0-1.el10_0 | < 1:20.18.2-2.module+el9.4.0+23089+aaa18a20
- nodejs-docs< 1:20.19.1-1.module+el8.10.0+23054+5431297f | < 1:20.19.1-1.module+el9.6.0+23053+4195b0b2 | < 1:22.15.0-1.el10_0 | < 1:20.18.2-2.module+el9.4.0+23089+aaa18a20
Alpine1 product
- c-ares< 1.34.5-r0
C-ares1 product
- c-ares≥ 1.32.3, < 1.34.5
Debian1 product
- c-ares< 1.34.5-1
Opensuse1 product
- c-ares&distro=openSUSE Tumbleweed< 1.34.5-1.1
Ubuntu1 product
- c-ares< 1.34.4-2.1ubuntu0.1
6 vendors · 21 products
References
23 links- github.com/c-ares/c-ares/commit/29d38719112639d8c0ba910254a3dd4f482ea2d1X Refsource MISCARTICLEREPORT