{"answers":{"affected":"3 open source packages ship an affected version, including async-nats.","exploited":"There is no known exploitation of GHSA-f5v5-ccqc-6w36 in the wild and no public exploit code.","fix":"Upgrade async-nats to 0.29.0 or later.","what":"GHSA-f5v5-ccqc-6w36 is a vulnerability in async-nats, published on 24 Mar 2023. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-f5v5-ccqc-6w36 and fix it if it is affected.\n\nWhat it is: GHSA-f5v5-ccqc-6w36 is a vulnerability in async-nats, published on 24 Mar 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-f5v5-ccqc-6w36 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- async-nats (crates.io): affected all versions; fixed in 0.29.0\n- async-nats (crates.io): affected all versions; fixed in 0.29.0\n- async-nats (crates.io): affected from 0.0.0-0; fixed in 0.29.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-f5v5-ccqc-6w36/ (Markdown: https://insights.sbomify.com/GHSA-f5v5-ccqc-6w36/index.md)","id":"GHSA-f5v5-ccqc-6w36","markdown":"https://insights.sbomify.com/GHSA-f5v5-ccqc-6w36/index.md","name":"GHSA-f5v5-ccqc-6w36","record":{"aliases":["RUSTSEC-2023-0027"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass","data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"NATS Rust client","requires_auth":"none","summary":"A Man-in-the-Middle attacker can bypass TLS certificate validation in NATS Rust clients by tampering with the server's INFO message host field.","user_interaction":"not_required","vuln_class":"security_feature_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"The NATS official Rust clients are vulnerable to MitM when using TLS.\n\nThe common name of the server's TLS certificate is validated against\nthe `host`name provided by the server's plaintext `INFO` message\nduring the initial connection setup phase. A MitM proxy can tamper with\nthe `host` field's value by substituting it with the common name of a\nvalid certificate it controls, fooling the client into accepting it.\n\n## Reproduction steps\n\n1. The NATS Rust client tries to establish a new connection\n2. The connection is intercepted by a MitM proxy\n3. The proxy makes a separate connection to the NATS server\n4. The NATS server replies with an `INFO` message\n5. The proxy reads the `INFO`, alters the `host` JSON field and passes\n   the tampered `INFO` back to the client\n6. The proxy upgrades the client connection to TLS, presenting a certificate issued\n   by a certificate authority present in the client's keychain.\n   In the previous step the `host` was set to the common name of said certificate\n7. `rustls` accepts the certificate, having verified that the common name matches the\n   attacker-controlled value it was given\n9. The client has been fooled by the MitM proxy into accepting the attacker-controlled certificate","ecosystems":["crates.io"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"TLS certificate common name validation bypass","id":"GHSA-f5v5-ccqc-6w36","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"security_feature_bypass","year":"2023"},"n_packages":3,"n_references":null,"packages":[{"ecosystem":"crates.io","fixed":["0.29.0"],"introduced":["0"],"last_affected":[],"package":"async-nats","purl":null,"source":"GHSA-f5v5-ccqc-6w36"},{"ecosystem":"crates.io","fixed":["0.29.0"],"introduced":["0"],"last_affected":[],"package":"async-nats","purl":"pkg:cargo/async-nats","source":"GHSA-f5v5-ccqc-6w36"},{"ecosystem":"crates.io","fixed":["0.29.0"],"introduced":["0.0.0-0"],"last_affected":[],"package":"async-nats","purl":"pkg:cargo/async-nats","source":"RUSTSEC-2023-0027"}],"products":null,"published":"2023-03-24","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"open","licence":"CC0 1.0","name":"RustSec","prefix":"RUSTSEC"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"A Man-in-the-Middle attacker can bypass TLS certificate validation in NATS Rust clients by tampering with the server's INFO message host field.","url":"https://insights.sbomify.com/GHSA-f5v5-ccqc-6w36/"}