CVE-2020-26149: Sensitive Data Exposure in NATS

nats Updated 02 Oct 2025

Summary

08/10/2020
Yes i
High
7.5

CVE-2020-26149: Sensitive data exposure in NATS. Affects nats versions >= 2.0.0-201, < 2.0.0-209. Fixed in 2.0.0-209. 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 Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

NATS is an open-source messaging system that provides lightweight and high-performance communication between distributed applications. It offers various client libraries for different programming languages, including nats.js, nats.ws, and nats.deno. These libraries enable developers to connect to a NATS server and exchange messages efficiently. However, certain versions of these libraries have a vulnerability that exposes sensitive data, including TLS private credentials, to the server. This flaw occurs due to the serialization and transmission of the entire connection configuration options to the server immediately after TLS establishment. The affected versions include nats.js beta branch versions from 2.0.0-201 to 2.0.0-209, nats.ws versions from 1.0.0-85 to 1.0.0-111, and all git tags prior to v1.0.0-9 in the nats.deno repository.

Vulnerability Detail

The vulnerability in the affected versions of the NATS libraries allows for the leakage of sensitive data from the client application to the server. Specifically, if the client is using TLS client certificates for mutual TLS authentication, the private key material for TLS is exposed to the server. This poses a significant security risk if the server is untrusted or if the client application disables TLS verification, as it allows an attacker with access to the server to obtain the client's authentication credentials. It is important to note that most authentication mechanisms are not affected by this vulnerability, except for TLS client certificates. NATS account NKey authentication is not impacted. The severity of this vulnerability is rated as HIGH with a CVSS score of 7.5.

How To Fix

Latest published version: 2.29.3 as of 23 Oct 2026

npm install nats@2.29.3

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.0.0-209

This is the first release that contains the fix.

npm install nats@2.0.0-209

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

Conclusion

In conclusion, the NATS libraries (nats.js, nats.ws, and nats.deno) in certain versions have a vulnerability that exposes sensitive data to the server. To mitigate this issue, it is crucial to update the affected libraries to the latest fixed versions. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for nats →

Share this vulnerability

FAQ

The vulnerability affects the beta branch of nats.js versions from 2.0.0-201 to 2.0.0-209. The mainline version is unaffected.

Yes, the vulnerability is present in nats.ws versions from 1.0.0-85 to 1.0.0-111 and all git tags prior to v1.0.0-9 in the nats.deno repository. However, the likelihood of applications using these clients leaking sensitive data is minimal.

No, NATS account NKey authentication is not affected by this vulnerability. Only TLS client certificates are impacted.

The impact of this vulnerability is the exposure of TLS private key material from the client application to the server. If the server is untrusted or the client application disables TLS verification, this can lead to the leakage of authentication credentials.

The severity of this vulnerability is rated as HIGH with a CVSS score of 7.5.

Related vulnerabilities

Recent vulnerabilities recorded for nats.

How To Fix

Latest published version: 2.29.3 as of 23 Oct 2026

npm install nats@2.29.3

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.0.0-209

This is the first release that contains the fix.

npm install nats@2.0.0-209

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