GHSA-82rf-q3pr-4f6p is a high-severity (CVSS 7.5) CWE-522 vulnerability in nats. O3 Security confirms whether GHSA-82rf-q3pr-4f6p is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.
Sensitive data exposure in NATS
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, a proxy for how much of the ecosystem is exposed.
natsnpmnats.wsnpmDescription
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
- Deno repository https://github.com/nats-io/nats.deno
- 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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | nats | ≥ 2.0.0-201&&< 2.0.0-209 | 2.0.0-209 |
| 📦npm | nats.ws | ≥ 1.0.0-85&&< 1.0.0-111 | 1.0.0-111 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for nats. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update nats to 2.0.0-209 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-82rf-q3pr-4f6p is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-82rf-q3pr-4f6p is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-82rf-q3pr-4f6p. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-82rf-q3pr-4f6p in your dependencies?
O3 detects GHSA-82rf-q3pr-4f6p across npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.