All vulnerabilities

Servers and applications

CVE-2026-33630

Use-after-free / double-free in c-ares query-completion handling, remotely triggerable via ares_getaddrinfo() over TCP

Severity
High 7.5
Published
6 Jul 2026
Last changed
6 Jul 2026
Added to UpHeron
3 Nov 2026
Fixed in
1.34.7
Exploit chance
0.8% in the next 30 daysHigher than 58% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
Double free (CWE-415)Use after free (CWE-416)
Attack
Over the network · No login needed · No user action needed
Attacker can
Take it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Also known as
GHSA-6wfj-rwm7-3542
Sources
Project advisories (GitHub)

Description

A use-after-free / double-free in c-ares' query-completion handling. The same flaw — a query's callback being invoked while the query is still linked in the channel's internal lookup structures — is present at multiple points in the resend/finish path (timeout handling, response handling, and query dispatch). If the query, or for ares_getaddrinfo() the owning host_query, is freed as a side effect of that callback, it is then accessed and/or freed a second time.

It is reachable in two ways:

  • Application-triggered: a callback that re-enters c-ares, for example by calling ares_cancel(). The callback frees the query and it is freed again after the callback returns.
  • Remotely, with no application cooperation: via ares_getaddrinfo() over TCP. A malicious or on-path DNS server that returns a FORMERR without an OPT record (forcing an EDNS-downgrade retry), then a second response with the same query id, then resets the connection, causes ares_getaddrinfo()'s internal completion handler…
From c-ares/c-ares's security advisory. Shortened; the full text is there.

Workarounds

Avoid calling ares_cancel() from within a query callback. This does not address the remotely-triggered path, which is driven entirely by DNS responses and has no reliable application-level workaround; upgrade to a fixed release, and prefer trusted resolvers reached over a trusted transport.

Workarounds as given by c-ares/c-ares's security advisory.

Affected software

SoftwareAffected versions
c-aresServers and applications · github:c-ares/c-ares
  • From 1.32.3 before 1.34.7

About c-ares

library for asynchronous DNS requests

From Wikidata, CC0 1.0.
GitHub stars
2,215GitHub, 15 Nov 2026
Forks
727GitHub, 15 Nov 2026
Latest release
v1.34.9GitHub, 15 Nov 2026
Released
20 Oct 2026GitHub
License
MIT LicenseWikidata
Written in
CWikidata
First published on GitHub
20 Mar 2010GitHub

References