CVE-2025-31498

Source
https://cve.org/CVERecord?id=CVE-2025-31498
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-31498.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2025-31498
Aliases
  • GHSA-6hxc-62jh-p29v
Downstream
Related
Published
2025-04-08T13:53:11.232Z
Modified
2026-07-15T02:14:23.297429379Z
Severity
  • 8.3 (High) CVSS_V4 - CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N CVSS Calculator
Summary
c-ares has a use-after-free in read_answers()
Details

c-ares is an asynchronous resolver library. From 1.32.3 through 1.34.4, there is a use-after-free in readanswers() when processanswer() 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.

Database specific
{
    "cwe_ids": [
        "CWE-416"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/31xxx/CVE-2025-31498.json",
    "cna_assigner": "GitHub_M"
}
References

Affected packages

Git / github.com/c-ares/c-ares

Affected ranges

Type
GIT
Repo
https://github.com/c-ares/c-ares
Events
Database specific
{
    "extracted_events": [
        {
            "introduced": "1.32.3"
        },
        {
            "fixed": "1.34.5"
        }
    ],
    "source": "AFFECTED_FIELD"
}

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-31498.json"