Moderate Vulnerability in Node.js: Use-After-Free Issue in c-ares

nodejs Updated 02 Oct 2025

Summary

05/05/2025
N/A
Yes i
Unrated
Not published

ALSA-2025:4461: Moderate: nodejs:20 security update. Affects nodejs versions < 1:20.19.1-1.module_el8.10.0+3987+dbda4426. Fixed in 1:20.19.1-1.module_el8.10.0+3987+dbda4426. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

Node.js is a powerful software development platform designed for building fast and scalable network applications using JavaScript. It is widely used for server-side development and has a rich ecosystem of libraries and frameworks. The platform's performance and efficiency make it a popular choice among developers. However, like any software, Node.js can be susceptible to vulnerabilities that may compromise its security and functionality.

Vulnerability Detail

The vulnerability identified in this report is a use-after-free issue in the c-ares library, specifically in the read_answers() function. This flaw can lead to potential memory corruption, which may allow an attacker to execute arbitrary code or crash the application. The vulnerability is tracked under CVE-2025-31498 and poses a moderate risk to applications utilizing affected versions of Node.js and its related packages.

How To Fix

Minimum fixed version

1:20.19.1-1.module_el8.10.0+3987+dbda4426

This is the first release that contains the fix.

sudo dnf update nodejs

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If immediate patching is not feasible, consider implementing the following workaround: limit the use of the c-ares library in your application until the update can be applied. Monitor your application for any unusual behavior that may indicate exploitation of this vulnerability.

Conclusion

In summary, the identified vulnerability in Node.js poses a moderate risk due to a use-after-free issue in the c-ares library. It is crucial to update affected packages to their patched versions to mitigate potential security risks. Users are encouraged to utilize tools like Vulert to monitor their applications for vulnerabilities.

See every vulnerability recorded for nodejs →

Share this vulnerability

FAQ

CVE-2025-31498 is a security vulnerability in the c-ares library used by Node.js, which involves a use-after-free issue in the read_answers() function.

This vulnerability can lead to memory corruption, potentially allowing attackers to execute arbitrary code or crash your application.

Versions prior to 1:20.19.1-1.module_el8.10.0+3987+dbda4426 are affected by this vulnerability.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Check your application against the vulnerability using the Vulert playground at Vulert Scanner.

Yes, you can limit the use of the c-ares library in your application and monitor for any unusual behavior until the update is applied.

Related vulnerabilities

Recent vulnerabilities recorded for nodejs.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

1:20.19.1-1.module_el8.10.0+3987+dbda4426

This is the first release that contains the fix.

sudo dnf update nodejs

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback