CVE-2025-31498

Published Apr 8, 2025

Last updated 2 months ago

Overview

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.
Source
security-advisories@github.com
NVD status
Awaiting Analysis

Risk scores

CVSS 4.0

Type
Secondary
Base score
8.3
Impact score
-
Exploitability score
-
Vector string
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
Severity
HIGH

Weaknesses

security-advisories@github.com
CWE-416

Social media

Hype score
Not currently trending
  1. πŸ”₯ URGENT: Node.js 22.15.0 on Fedora 41 fixes a critical use-after-free exploit (CVE-2025-31498). πŸ’» Risk: RCE via c-ares DNS handling. ⚑ Fix: sudo dnf upgrade --advisory FEDORA-2025-2c1f4c46d0 Read πŸ‘‰ https://t.co/zdfvUDu634 #LinuxSecurity #NodeJS https://t.co/

    @Cezar_H_Linux

    11 May 2025

    48 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    0 Replies

    0 Quotes

  2. 🚨 Breaking: CVE-2025-31498 exposes Ubuntu 25.04/24.10 to DoS attacks via c-ares DNS flaw. πŸ’» Patch immediately: sudo apt upgrade libcares2 πŸ”— Full analysis: πŸ‘‰ https://t.co/wmijIHC3ED #Ubuntu #Security https://t.co/ixLQZAJ6Y9

    @Cezar_H_Linux

    5 May 2025

    31 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    0 Replies

    0 Quotes

  3. CVE-2025-31498 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 eithe… https://t.co/X2l4f1Suc0

    @CVEnew

    8 Apr 2025

    266 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    0 Replies

    0 Quotes

  4. [CVE-2025-31498: HIGH] Vulnerability in c-ares 1.32.3 through 1.34.4 may allow a remote attacker to exploit use-after-free issue in read_answers(). Update to 1.34.5 to fix this cyber security threat.#cybersecurity,#vulnerability https://t.co/sLTrHZOPXy https://t.co/UJC5R74f20

    @CveFindCom

    8 Apr 2025

    26 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    0 Replies

    0 Quotes

  5. CVE-2025-31498: c-ares: Use-after-free in read_answers() https://t.co/IHUYvpPCTs Versions 1.32.3 - 1.34.4 are affected. Patch in 1.34.5. c-ares started handling UDP write failures in 1.32.3, thus uncovering this particular issue.

    @oss_security

    8 Apr 2025

    71 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    0 Replies

    0 Quotes