CVE-2019-16225: lmdb - Invalid Write Operation in py-lmdb 0.97

lmdb Updated 02 Oct 2025

Summary

11/09/2019
Yes i
Critical
9.8

CVE-2019-16225: An issue was discovered in py-lmdb 0.97. Affects lmdb versions < 0.98. Fixed in 0.98. How to fix ↓

Also tracked for

The same CVE-2019-16225 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

lmdb is a Python library that provides a high-performance, memory-efficient key-value store. It is commonly used for managing databases and other data storage needs. The vulnerability affects version 0.97 of the py-lmdb library, which is a Python binding for lmdb. This vulnerability allows an attacker to perform an invalid write operation when accessing a data.mdb file.

Vulnerability Detail

The issue arises due to a flaw in the mdb_page_touch function of py-lmdb. When certain values of mp_flags are used, the function fails to properly set up mc->mc_pg[mc->top], leading to an invalid write operation. This vulnerability can be exploited by an attacker who supplies a malicious data.mdb file. The consequences of this vulnerability include potential data corruption, unauthorized access, and possible remote code execution.

How To Fix

Minimum fixed version

0.98

This is the first release that contains the fix.

pip install --upgrade "lmdb==0.98"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is crucial to update to the fixed version of the library as soon as possible.

Conclusion

The vulnerability in py-lmdb 0.97 allows for an invalid write operation when accessing a data.mdb file. To mitigate this issue, it is crucial to upgrade to version 0.98 or later of the py-lmdb library. This can be done by running 'pip install --upgrade lmdb'. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for lmdb →

Share this vulnerability

FAQ

lmdb is a high-performance, memory-efficient key-value store library commonly used for managing databases and data storage needs in Python.

py-lmdb is a Python binding for the lmdb library, providing a convenient interface for using lmdb in Python applications.

This vulnerability can lead to data corruption, unauthorized access, and potential remote code execution if an attacker supplies a malicious data.mdb file.

To fix this vulnerability, upgrade to version 0.98 or later of the py-lmdb library by running 'pip install --upgrade lmdb'.

No, there is no known workaround for this vulnerability. It is essential to update to the fixed version of the library.

Related vulnerabilities

Recent vulnerabilities recorded for lmdb.

How To Fix

Minimum fixed version

0.98

This is the first release that contains the fix.

pip install --upgrade "lmdb==0.98"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback