CVE-2021-27376 nb-connect invalidly assumes the memory layout of std::net::SocketAddr

Critical 9.8 Published Updated

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.

PackageAffectedFixed in
nb-connect crates.ioAll versions1.0.3
nb-connect crates.ioAll versions1.0.3
nb-connect crates.ioFrom 0.0.0-01.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.

Is CVE-2021-27376 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free