CVE-2025-31498
npm vulnerability analysis and mitigation

Overview

CVE-2025-31498 affects c-ares, an asynchronous resolver library, versions 1.32.3 through 1.34.4. The vulnerability is a use-after-free issue in the read_answers() function when process_answer() may re-enqueue a query due to DNS Cookie Failure, upstream server EDNS incompatibility, or TCP query connection closure. The vulnerability was discovered by Erik Lax and was patched in version 1.34.5 (GitHub Advisory).

Technical details

The vulnerability occurs when a connection handle is closed due to transaction issues, but read_answers() continues to expect the handle to be available for dequeuing responses. This creates a use-after-free condition in the DNS resolution process. The issue has been assigned a CVSSv4 score of 8.3 (High), with attack vector being Network and attack complexity being High (GitHub Advisory, Security Online).

Impact

The vulnerability could potentially lead to system crashes or possible code execution. The impact metrics indicate Low impact on confidentiality and integrity, but High impact on availability of the vulnerable system. The vulnerability affects the core DNS resolution functionality, which could disrupt network operations for applications using the c-ares library (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been fixed in c-ares version 1.34.5. Users should upgrade to this version immediately. For those unable to upgrade immediately, there are no known workarounds. Specific patches are available for different versions: 1.34 patches, 1.33 patches, and 1.32 patches through the official repository (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related npm vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-14257HIGH7.5
  • JavaScript logoJavaScript
  • nextcloud-server-32
NoYesJul 23, 2026
CVE-2026-48815HIGH7.5
  • JavaScript logoJavaScript
  • ubi10::s2i-base
NoYesJul 14, 2026
CVE-2026-48816MEDIUM6.5
  • JavaScript logoJavaScript
  • npm
NoYesJul 14, 2026
CVE-2026-48758MEDIUM5.4
  • JavaScript logoJavaScript
  • nodejs22
NoYesJul 14, 2026
CVE-2026-59875MEDIUM5.3
  • JavaScript logoJavaScript
  • nodejs:22::nodejs-docs
NoYesJul 08, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management