CVE-2019-16227 py-lmdb Invalid write operation

Critical 9.8 Published Updated

An attacker can trigger memory corruption in the py-lmdb library by providing a malicious database file, potentially leading to code execution or crashes.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2019-16227?

CVE-2019-16227 is a critical memory corruption vulnerability in n/a, published on 11 Sep 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

An issue was discovered in py-lmdb 0.97. For certain values of mn_flags, mdb_cursor_set triggers a memcpy with an invalid write operation within mdb_xcursor_init1. NOTE: this outcome occurs when accessing a data.mdb file supplied by an attacker.

Weakness: CWE-787

Which versions are affected by CVE-2019-16227?

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

PackageAffectedFixed in
lmdb PyPIAll versions to 0.97None
lmdb PyPIAll versions to 0.97None
lmdb PyPIAll versions0.98

Products include Py-Lmdb Project Py-Lmdb.

How do I fix CVE-2019-16227?

Upgrade lmdb to 0.98 or later.

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

Is CVE-2019-16227 being exploited?

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

Sources

Also known as DEBIAN-CVE-2019-16227, ECHO-e174-ee41-e2ae, GHSA-pf3p-v9xp-mrvf, PYSEC-2019-239, UBUNTU-CVE-2019-16227.

Is CVE-2019-16227 in your software?

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

Check your SBOMs for free