8.3

CVE-2025-31498: c-ares has a use-after-free in read_answers()

Deferred
AliasesALPINE-CVE-2025-31498RHSA-2025:4461RHSA-2025:7426
Published 08-04-2025Last modified 08-04-2025

Vulnerability summary

CVE-2025-31498 is a high (CVSS 8.3) Use After Free vulnerability in c-ares. EPSS estimates a 0.60% chance of exploitation in the next 30 days, higher than 50.2% of scored vulnerabilities.

Priority
Prioritisesevere

Severe, CVSS 8.3 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 1% (FIRST, 04-12-2026)

Source freshness unavailable

How is this decided?
CVSS score
8.3/10
010
High · v4.0 (CVE.org)
EPSS score
0.60%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 5 · Related 3

Timeline

  1. 08-04-2025
    PublishedVulnerability first disclosed.
  2. 08-04-2025
    Last 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

EPSS trend

Probability

0.60%

Chance of exploitation in the next 30 days

Percentile

50%

Versus all other CVEs

30-day change

No change 0.00 pp

From 0.60% on 04-11-2026

04-11-202604-12-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.

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
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
Show all 23 references