CVE-2021-27376 nb-connect invalidly assumes the memory layout of std::net::SocketAddr
The nb-connect Rust crate allows invalid memory access via unsafe casts, potentially leading to crashes or code execution.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-27376?
CVE-2021-27376 is a critical memory corruption vulnerability in n/a, published on 18 Feb 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
An issue was discovered in the nb-connect crate before 1.0.3 for Rust. It may have invalid memory access for certain versions of the standard library because it relies on a direct cast of std::net::SocketAddrV4 and std::net::SocketAddrV6 data structures.
Weakness: CWE-119
Which versions are affected by CVE-2021-27376?
3 open source packages ship an affected version, including nb-connect. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
nb-connect crates.io | All versions | 1.0.3 |
nb-connect crates.io | All versions | 1.0.3 |
nb-connect crates.io | From 0.0.0-0 | 1.0.3 |
Products include Nb-Connect Project Nb-Connect.
How do I fix CVE-2021-27376?
Upgrade nb-connect to 1.0.3 or later.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2021-27376 being exploited?
There is no known exploitation of CVE-2021-27376 in the wild and no public exploit code.
Sources
Also known as GHSA-rm4w-6696-r77p, RUSTSEC-2021-0021.