CVE-2023-37365 hnswlib Double Free vulnerability

Medium 6.5 Published Updated

A double free vulnerability in Hnswlib allows attackers to cause denial of service or potentially execute code via a large M argument.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2023-37365?

CVE-2023-37365 is a medium-severity memory corruption vulnerability in n/a, published on 30 Jun 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

Hnswlib 0.7.0 has a double free in init_index when the M argument is a large integer.

Weakness: CWE-415

Which versions are affected by CVE-2023-37365?

3 open source packages ship an affected version, including hnswlib. It affects 1 product.

PackageAffectedFixed in
hnswlib PyPIAll versions0.8.0
hnswlib PyPIAll versions0.8.0
hnswlib PyPIAll versions0.8.0

Products include Hnswlib Project Hnswlib.

How do I fix CVE-2023-37365?

Upgrade hnswlib to 0.8.0 or later.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2023-37365 being exploited?

There is no known exploitation of CVE-2023-37365 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2023-37365, GHSA-xwc8-rf6m-xr86, PYSEC-2026-1450, UBUNTU-CVE-2023-37365.

Is CVE-2023-37365 in your software?

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

Check your SBOMs for free