CVE catalog

CVE-2025-31498

c-ares: CVE-2025-31498

[CVE catalog]

Severity
High · CVSS 7CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:H
Published
Source
[NVD] · [CVE record]
EPSS
0.59% · Oct 27, 2026

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.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debianc-aressid1.34.9-1fixed
Debianc-aresforky1.34.8-1fixed
Debianc-arestrixie1.34.5-1+deb13u1fixed
Debianc-arestrixie-security1.34.5-1+deb13u1fixed
Debianc-aresbookworm1.18.1-3not affected
Susec-areslinux micro 6.11.34.8-slfo.1.1_1.1fixed
Susec-areslinux micro 6.01.34.8-1.1fixed
Alpinec-ares3.211.34.5-r0fixed
Alpinec-ares3.221.34.5-r0fixed
Alpinec-ares3.231.34.5-r0fixed
Alpinec-ares3.241.34.5-r0fixed
Opensusec-arestumbleweed1.34.5-1.1fixed
Ubuntuc-ares25.041.33.0-1vulnerable
Ubuntuc-ares25.041.34.2-1vulnerable
Ubuntuc-ares25.041.34.3-1vulnerable
Ubuntuc-ares25.041.34.4-1vulnerable
Ubuntuc-ares25.041.34.4-2.1vulnerable
Ubuntuc-ares25.041.34.4-2.1ubuntu0.1fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debianc-aressourcesid1.34.5-1not yet assignedNot reportedNot reported
Debianc-aressourceforky1.34.5-1not yet assignedNot reportedNot reported
Debianc-aressourcetrixie1.34.5-1not yet assignedNot reportedNot reported
Debianc-aressourcebookwormNot affectedunimportantNot reportedNot reported
Susec-aresrpmlinux micro 6.11.34.8-slfo.1.1_1.1Not reportedSUSE-SU-2026:23414-1Not reported
Susec-aresrpmlinux micro 6.01.34.8-1.1Not reportedSUSE-SU-2026:23364-1Not reported
Alpinec-aresapk3.211.34.5-r0Not reportedALPINE-CVE-2025-31498Not reported
Alpinec-aresapk3.221.34.5-r0Not reportedALPINE-CVE-2025-31498Not reported
Alpinec-aresapk3.231.34.5-r0Not reportedALPINE-CVE-2025-31498Not reported
Alpinec-aresapk3.241.34.5-r0Not reportedALPINE-CVE-2025-31498Not reported
Opensusec-aresrpmtumbleweed1.34.5-1.1Not reportedOPENSUSE-SU-2025:14977-1Not reported
Ubuntuc-aresdeb25.041.34.4-2.1ubuntu0.1Not reportedUSN-7477-1Not reported

OpenFactory catalog packages

[openSUSE Tumbleweed]

  • [c-ares-devel]Unknown

    Source package: [c-ares]

    Details (1)
    • 1.34.8-1.1 · x86_64 · tumbleweed

      Unknown · Fixed: 1.34.5-1.1

      Version impact unknown

      dsa · c-ares · opensuse · tumbleweed

  • [c-ares-utils]Unknown

    Source package: [c-ares]

    Details (1)
    • 1.34.8-1.1 · x86_64 · tumbleweed

      Unknown · Fixed: 1.34.5-1.1

      Version impact unknown

      dsa · c-ares · opensuse · tumbleweed

  • [libcares2]Unknown

    Source package: [c-ares]

    Details (1)
    • 1.34.8-1.1 · x86_64 · tumbleweed

      Unknown · Fixed: 1.34.5-1.1

      Version impact unknown

      dsa · c-ares · opensuse · tumbleweed

  • Source package: [c-ares]

    Details (1)
    • 1.34.8-1.1 · x86_64 · tumbleweed

      Unknown · Fixed: 1.34.5-1.1

      Version impact unknown

      dsa · c-ares · opensuse · tumbleweed

[Debian 12 (Bookworm)]

  • [libc-ares2]Not affected

    Source package: [c-ares]

    Details (2)
    • 1.18.1-3 · amd64 · bookworm

      Not affected

      dsa · c-ares · debian · bookworm

    • 1.18.1-3 · arm64 · bookworm

      Not affected

      dsa · c-ares · debian · bookworm

  • [libc-ares-dev]Not affected

    Source package: [c-ares]

    Details (2)
    • 1.18.1-3 · amd64 · bookworm

      Not affected

      dsa · c-ares · debian · bookworm

    • 1.18.1-3 · arm64 · bookworm

      Not affected

      dsa · c-ares · debian · bookworm

[Debian 13 (Trixie)]

  • [libc-ares2]Fixed

    Source package: [c-ares]

    Details (4)
    • 1.34.5-1+deb13u1 · all · trixie

      Fixed · Fixed: 1.34.5-1

      dsa · c-ares · debian · 13

    • 1.34.5-1+deb13u1 · all · trixie

      Fixed · Fixed: 1.34.5-1

      dsa · c-ares · debian · 13

    • 1.34.5-1+deb13u1 · all · trixie-security

      Fixed · Fixed: 1.34.5-1

      dsa · c-ares · debian · 13

    • 1.34.5-1+deb13u1 · all · trixie-security

      Fixed · Fixed: 1.34.5-1

      dsa · c-ares · debian · 13

  • [libcares2]Fixed

    Source package: [c-ares]

    Details (4)
    • 1.34.5-1+deb13u1 · amd64 · trixie

      Fixed · Fixed: 1.34.5-1

      dsa · c-ares · debian · 13

    • 1.34.5-1+deb13u1 · arm64 · trixie

      Fixed · Fixed: 1.34.5-1

      dsa · c-ares · debian · 13

    • 1.34.5-1+deb13u1 · amd64 · trixie-security

      Fixed · Fixed: 1.34.5-1

      dsa · c-ares · debian · 13

    • 1.34.5-1+deb13u1 · arm64 · trixie-security

      Fixed · Fixed: 1.34.5-1

      dsa · c-ares · debian · 13

  • Source package: [c-ares]

    Details (4)
    • 1.34.5-1+deb13u1 · amd64 · trixie

      Fixed · Fixed: 1.34.5-1

      dsa · c-ares · debian · 13

    • 1.34.5-1+deb13u1 · arm64 · trixie

      Fixed · Fixed: 1.34.5-1

      dsa · c-ares · debian · 13

    • 1.34.5-1+deb13u1 · amd64 · trixie-security

      Fixed · Fixed: 1.34.5-1

      dsa · c-ares · debian · 13

    • 1.34.5-1+deb13u1 · arm64 · trixie-security

      Fixed · Fixed: 1.34.5-1

      dsa · c-ares · debian · 13

Observed:

References