{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2025-31498","id":"CVE-2025-31498","title":"c-ares has a use-after-free in read_answers()","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 transa","descriptionLong":"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.","published":"2025-04-08T13:53:11.232Z","updated":"2026-10-28T10:51:35.303332888Z","reserved":"2025-03-28T13:36:51.300Z","status":"Deferred","rejected":false,"assigner":"GitHub_M","metric":{"version":"4.0","score":8.3,"vector":"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","rating":"high","source":"GitHub_M"},"metrics":[{"version":"4.0","score":8.3,"vector":"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","rating":"high","source":"GitHub_M"},{"version":"4.0","score":8.3,"vector":"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/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","rating":"high","source":"github.com"},{"version":"4.0","score":null,"vector":"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","rating":"unrated","source":"OSV"}],"rating":"high","products":["c-ares"],"affectedProducts":[{"vendor":"c-ares","product":"c-ares","defaultStatus":null,"versions":[{"version":">= 1.32.3, < 1.34.5","status":"affected"}],"platforms":[]}],"packages":[],"cwes":["CWE-416"],"aliases":["GHSA-6hxc-62jh-p29v"],"references":[{"url":"https://github.com/c-ares/c-ares/security/advisories/GHSA-6hxc-62jh-p29v","tags":["x_refsource_CONFIRM","advisory"]},{"url":"https://github.com/c-ares/c-ares/pull/821","tags":["x_refsource_MISC","fix"]},{"url":"https://github.com/c-ares/c-ares/commit/29d38719112639d8c0ba910254a3dd4f482ea2d1","tags":["x_refsource_MISC","fix"]},{"url":"http://www.openwall.com/lists/oss-security/2025/04/08/3","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/31xxx/CVE-2025-31498.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-31498","tags":["advisory"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00602,"epssPercentile":0.49591,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2025-31498","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-31498","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2025-31498","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2025-31498","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}