CVE-2020-8265: use-after-free in TLSWrap
A flaw was found in nodejs. When writing to a TLS enabled socket, node::StreamBase::Write calls node::TLSWrap::DoWrite with a freshly allocated WriteWrap object as first argument. If the DoWrite method does not return an error, this object is passed back to the caller as part of a StreamWriteResult structure. This may be exploited to corrupt memory leading to a Denial of Service or potentially other exploits.
Other sources
Affected Node.js versions are vulnerable to a use-after-free bug in its TLS implementation. When writing to a TLS enabled socket, node::StreamBase::Write calls node::TLSWrap::DoWrite with a freshly allocated WriteWrap object as first argument. If the DoWrite method does not return an error, this object is passed back to the caller as part of a StreamWriteResult structure. This may be exploited to corrupt memory leading to a Denial of Service or potentially other exploits.
All versions of the 15.x, 14.x, 12.x and 10.x releases lines
— Node.Js
Affected Node.js versions are vulnerable to a use-after-free bug in its TLS implementation. When writing to a TLS enabled socket, node::StreamBase::Write calls node::TLSWrap::DoWrite with a freshly allocated WriteWrap object as first argument. If the DoWrite method does not return an error, this object is passed back to the caller as part of a StreamWriteResult structure. This may be exploited to corrupt memory leading to a Denial of Service or potentially other exploits.
Reference: https://nodejs.org/en/blog/vulnerability/january-2021-security-releases/
— Red Hat
Node.js is vulnerable to a denial of service, caused by a use-after-free in TLSWrap within the TLS implementation. By writing to a TLS enabled socket, an attacker could exploit this vulnerability to corrupt memory and cause a denial of service.
— IBM
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. When writing to a TLS enabled socket, node::StreamBase::Write calls node::TLSWrap::DoWrite with a freshly allocated WriteWrap object as first argument. If the DoWrite method does not return an error, this object is passed back to the caller as part of a StreamWriteResult structure. This may be exploited to corrupt memory leading to a Denial of Service or potentially other exploits.
use-after-free in TLSWrap - affected Node.js versions are vulnerable to a use-after-free bug in its TLS implementation. When writing to a TLS enabled socket, node::StreamBase::Write calls node::TLSWrap::DoWrite with a freshly allocated WriteWrap object as first argument. If the DoWrite method does not return an error, this object is passed back to the caller as part of a StreamWriteResult structure. This may be exploited to corrupt memory leading to a Denial of Service or potentially other exploits.
— Node.Js
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/rh-nodejs14-nodejsto a version that resolves this vulnerability.Fixed in 0:14.15.4-2.el7 - Upgrade
Upgrade
redhat/rh-nodejs12-nodejsto a version that resolves this vulnerability.Fixed in 0:12.20.1-1.el7 - Upgrade
Upgrade
redhat/rh-nodejs12-nodejs-nodemonto a version that resolves this vulnerability.Fixed in 0:2.0.3-1.el7 - Upgrade
Upgrade
redhat/rh-nodejs10-nodejsto a version that resolves this vulnerability.Fixed in 0:10.23.1-2.el7 - Upgrade
Upgrade
debian/nodejsto a version that resolves this vulnerability.Fixed in 12.22.12~dfsg-1~deb11u4Fixed in 12.22.12~dfsg-1~deb11u5Fixed in 18.19.0+dfsg-6~deb12u2Fixed in 18.19.0+dfsg-6~deb12u1Fixed in 20.17.0+dfsg-2 - Upgrade
Upgrade
redhat/nodeto a version that resolves this vulnerability.Fixed in 10.23.1 - Upgrade
Upgrade
redhat/nodeto a version that resolves this vulnerability.Fixed in 12.20.1 - Upgrade
Upgrade
redhat/nodeto a version that resolves this vulnerability.Fixed in 14.15.4 - Upgrade
Upgrade
redhat/nodeto a version that resolves this vulnerability.Fixed in 15.5.1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 10.23.1Fixed in 12.20.1Fixed in 14.15.4Fixed in 15.5.1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 10.23.1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 12.20.1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 14.15.4 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 15.5.1 - Upgrade
Upgrade
alpine/nodejsto a version that resolves this vulnerability.Fixed in 12.20.1-r0 - Upgrade
Upgrade
alpine/nodejsto a version that resolves this vulnerability.Fixed in 14.15.4-r0 - Upgrade
Upgrade
alpine/nodejs-currentto a version that resolves this vulnerability.Fixed in 15.5.1-r0
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is CVE-2020-8265?
CVE-2020-8265 is a vulnerability in Node.js versions before 10.23.1, 12.20.1, 14.15.4, 15.5.1 that allows for a use-after-free bug in its TLS implementation.
What is the severity of CVE-2020-8265?
CVE-2020-8265 has a severity rating of 8.1 (High).
How does CVE-2020-8265 affect software?
CVE-2020-8265 affects Node.js versions before 10.23.1, 12.20.1, 14.15.4, 15.5.1.
How can I fix CVE-2020-8265?
To fix CVE-2020-8265, you should update your Node.js installation to version 10.23.1, 12.20.1, 14.15.4, or 15.5.1.
Where can I find more information about CVE-2020-8265?
You can find more information about CVE-2020-8265 on the CVE website, NIST Vulnerability Database, and the Red Hat Bugzilla and Errata.