CVE-2020-26149

CVE-2020-26149 is a high-severity security vulnerability in nats (npm), affecting versions >= 2.0.0-201, <= 2.0.0-206. It is fixed in 2.0.0-209, 1.0.0-111.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Sensitive data exposure in NATS

Preview versions of two NPM packages and one Deno package from the NATS project contain an information disclosure flaw, leaking options to the NATS server; for one package, this includes TLS private credentials.

The _connection_ configuration options in these JavaScript-based implementations were fully serialized and sent to the server in the client's CONNECT message, immediately after TLS establishment.

The nats.js client supports Mutual TLS and the credentials for the TLS client key are included in the connection configuration options; disclosure of the client's TLS private key to the server has been observed.

Most authentication mechanisms are handled after connection, instead of as part of connection, so other authentication mechanisms are unaffected. For clarity: NATS account NKey authentication is NOT affected.

Neither the nats.ws nor the nats.deno clients support Mutual TLS: the affected versions listed below are those where the logic flaw is present. We are including the nats.ws and nats.deno versions out of an abundance of caution, as library maintainers, but rate as minimal the likelihood of applications leaking sensitive data.

Security impact:

  • NPM package nats.js:
  • mainline is unaffected
  • beta branch is vulnerable from 2.0.0-201, fixed in 2.0.0-209

Logic flaw:

  • NPM package nats.ws:
  • status: preview
  • flawed from 1.0.0-85, fixed in 1.0.0-111
  • status: preview
  • flawed in all git tags prior to fix
  • fixed with git tag v1.0.0-9

Impact

For deployments using TLS client certificates (for mutual TLS), private key material for TLS is leaked from the client application to the server. If the server is untrusted (run by a third party), or if the client application also disables TLS verification (and so the true identity of the server is unverifiable) then authentication credentials are leaked.

CVE-2020-26149 has a CVSS score of 7.5 (High). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.0.0-209, 1.0.0-111); upgrading removes the vulnerable code path.

Affected versions

nats (>= 2.0.0-201, <= 2.0.0-206) nats.ws (>= 1.0.0-85, <= 1.0.0-110)

Security releases

nats → 2.0.0-209 (npm) nats.ws → 1.0.0-111 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Upgrade the following packages to resolve this vulnerability:

nats to 2.0.0-209 or later; nats.ws to 1.0.0-111 or later

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2020-26149? CVE-2020-26149 is a high-severity security vulnerability in nats (npm), affecting versions >= 2.0.0-201, <= 2.0.0-206. It is fixed in 2.0.0-209, 1.0.0-111.
  2. How severe is CVE-2020-26149? CVE-2020-26149 has a CVSS score of 7.5 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which packages are affected by CVE-2020-26149?
    • nats (npm) (versions >= 2.0.0-201, <= 2.0.0-206)
    • nats.ws (npm) (versions >= 1.0.0-85, <= 1.0.0-110)
  4. Is there a fix for CVE-2020-26149? Yes. CVE-2020-26149 is fixed in 2.0.0-209, 1.0.0-111. Upgrade to this version or later.
  5. Is CVE-2020-26149 exploitable, and should I be worried? Whether CVE-2020-26149 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2020-26149 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2020-26149?
    • Upgrade nats to 2.0.0-209 or later
    • Upgrade nats.ws to 1.0.0-111 or later

Other vulnerabilities in nats

Stop the waste.
Protect your environment with Kodem.