GHSA-f5v5-ccqc-6w36
async-nats vulnerable to TLS certificate common name validation bypass
Blast Radius
async-natsReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects crates.io packages — download data is not available via public APIs for these ecosystems.
Description
The NATS official Rust clients are vulnerable to MitM when using TLS.
The common name of the server's TLS certificate is validated against the hostname provided by the server's plaintext INFO message during the initial connection setup phase. A MitM proxy can tamper with the host field's value by substituting it with the common name of a valid certificate it controls, fooling the client into accepting it.
Reproduction steps
- The NATS Rust client tries to establish a new connection
- The connection is intercepted by a MitM proxy
- The proxy makes a separate connection to the NATS server
- The NATS server replies with an
INFOmessage - The proxy reads the
INFO, alters thehostJSON field and passes the tamperedINFOback to the client - The proxy upgrades the client connection to TLS, presenting a certificate issued by a certificate authority present in the client's keychain. In the previous step the
hostwas set to the common name of said certificate rustlsaccepts the certificate, having verified that the common name matches the attacker-controlled value it was given- The client has been fooled by the MitM proxy into accepting the attacker-controlled certificate
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🦀crates.io | async-nats | all versions | 0.29.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for async-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 async-nats to 0.29.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-f5v5-ccqc-6w36 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-f5v5-ccqc-6w36 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-f5v5-ccqc-6w36. 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-f5v5-ccqc-6w36 in your dependencies?
O3 detects GHSA-f5v5-ccqc-6w36 across crates.io dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.