Use-After-Free Vulnerability in Node.js TLS Implementation (CVE-2020-8265)

nodejs Updated 02 Oct 2025

Summary

06/01/2021
N/A
Yes i
High
8.1

CVE-2020-8265: Node.js versions before 10.23.1, 12.20.1, 14.15.4, 15.5.1 are vulnerable to a use-after-free bug in its TLS implementation. Affects nodejs across 2 version ranges.

< 12.20.1-r0 >= cf41627411886000429bde058a6594fb7f6d6d47, < 811be91dfe623c7569f5fd87b1eaf46074334c94

Fixed in 12.20.1-r0. 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 popular JavaScript runtime built on Chrome's V8 JavaScript engine. It allows developers to build scalable and high-performance applications. The TLS (Transport Layer Security) implementation in Node.js provides secure communication over the network. However, versions before 10.23.1, 12.20.1, 14.15.4, and 15.5.1 are vulnerable to a use-after-free bug in the TLS implementation.

Vulnerability Detail

The use-after-free vulnerability occurs when writing to a TLS enabled socket. The vulnerable code in node::StreamBase::Write calls node::TLSWrap::DoWrite with a freshly allocated WriteWrap object. If the DoWrite method does not return an error, this object is passed back to the caller as part of a StreamWriteResult structure. An attacker can exploit this vulnerability to corrupt memory, leading to a Denial of Service (DoS) or potentially other exploits.

How To Fix

Minimum fixed version

12.20.1-r0

This is the first release that contains the fix.

sudo apk add --upgrade nodejs

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

Workaround

If updating Node.js is not immediately feasible, a possible workaround is to disable TLS in affected applications until the update can be applied. However, this workaround may impact the security and functionality of the application, so updating to a patched version is strongly recommended.

Conclusion

The use-after-free vulnerability in Node.js TLS implementation (CVE-2020-8265) can have serious security implications, including Denial of Service (DoS) attacks and potential code execution. It is crucial to update Node.js to the patched versions mentioned or disable TLS in affected applications until the update can be applied. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for nodejs →

Share this vulnerability

FAQ

Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. It allows developers to build scalable and high-performance applications.

TLS (Transport Layer Security) is a cryptographic protocol that provides secure communication over the network. It ensures the confidentiality and integrity of data transmitted between client and server.

A use-after-free vulnerability occurs when a program continues to use a memory location after it has been freed. This can lead to memory corruption and potentially allow an attacker to execute arbitrary code or cause a crash.

The use-after-free vulnerability in Node.js TLS implementation can lead to a Denial of Service (DoS) attack or potentially allow an attacker to execute arbitrary code. It is important to update to a patched version to mitigate these risks.

You can use Vulert's playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities, using just a manifest file like package-lock.json.

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

12.20.1-r0

This is the first release that contains the fix.

sudo apk add --upgrade 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