CVE-2023-31124
npm vulnerability analysis and mitigation

Overview

CVE-2023-31124 affects c-ares, an asynchronous resolver library. The vulnerability was discovered in versions prior to 1.19.1 and disclosed on May 22, 2023. The issue occurs when cross-compiling c-ares using the autotools build system, specifically when cross-compiling for aarch64 android, where CARES_RANDOM_FILE is not set (GitHub Advisory).

Technical details

The vulnerability stems from a build system configuration issue where CARES_RANDOM_FILE is not properly set during cross-compilation. This results in the system falling back to using rand() instead of a Cryptographically Secure Pseudo-Random Number Generator (CSPRNG). The vulnerability has been assigned a CVSS v3.1 base score of 3.7 LOW, with a vector of CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N. The weakness has been categorized as CWE-330 (Use of Insufficiently Random Values) (GitHub Advisory).

Impact

The vulnerability could allow an attacker to take advantage of the lack of entropy by not using a CSPRNG, potentially compromising the security of DNS operations when the library is cross-compiled (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in c-ares version 1.19.1. As a workaround, users can use the CMake build system instead of autotools. Various distributions have released security updates, including Fedora 37 and 38, and Gentoo (Fedora Update, Gentoo Advisory).

Community reactions

The vulnerability was discovered during a security audit of c-ares performed by X41 D-SEC GmbH, which was funded by the Open Source Technology Improvement Fund (OSTIF). The audit findings led to prompt security patches and updates across multiple distributions (GitHub Release).

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-59874HIGH8.7
  • JavaScript logoJavaScript
  • tar
NoYesJul 08, 2026
CVE-2026-48815HIGH7.5
  • JavaScript logoJavaScript
  • pulumi-fips
NoYesJul 14, 2026
CVE-2026-48816MEDIUM6.5
  • JavaScript logoJavaScript
  • nodejs24
NoYesJul 14, 2026
CVE-2026-48758MEDIUM5.4
  • JavaScript logoJavaScript
  • sigstore
NoYesJul 14, 2026
CVE-2026-59875MEDIUM5.3
  • JavaScript logoJavaScript
  • seal-tar
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