Junglewise Threat Intelligence

CVE-2020-26149: NATS JavaScript client TLS private key exposure

CVE-2020-26149 · Severity: low · CVSS 3.1 · Published 2020-10-08

Vendors: NATS, npm.

Executive brief

NATS JavaScript-based client libraries send connection configuration options unfiltered to the server after TLS handshake, exposing sensitive data including TLS private key material. Organizations using mutual TLS (mTLS) authentication between clients and servers risk disclosure of cryptographic credentials if connected to an untrusted server or if TLS verification is disabled.

Technical details

A logic flaw in NATS JavaScript client libraries causes the connection configuration object to be fully serialized and transmitted to the server in the CONNECT message immediately after TLS establishment. For nats.js with mutual TLS support, this includes TLS client private key material. The vulnerability affects preview/beta versions only: nats.js 2.0.0-201 through 2.0.0-206, nats.ws 1.0.0-85 through 1.0.0-110, and nats.deno prior to v1.0.0-9. An attacker operating an untrusted NATS server, or an attacker who can disable client-side TLS verification, can intercept the CONNECT message and extract private key credentials. NKey authentication is not affected. Fixes are available in nats.js 2.0.0-209, nats.ws 1.0.0-111, and nats.deno v1.0.0-9 or later.

Affected products

  • NATS nats.js 2.0.0-201 to 2.0.0-206 (beta branch)
  • NATS nats.ws 1.0.0-85 to 1.0.0-110 (preview)
  • NATS nats.deno prior to v1.0.0-9 (preview)

Timeline

  • 2020-10-08: disclosed: Advisory published
  • 2020-09-30: other: Security issue reported via oss-security mailing list

References

Related threats