CVE-2019-16225: lmdb - Invalid Write Operation in py-lmdb 0.97
Summary
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
- py-lmdb · Debian:11
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.
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.
No signup required · Results in about 60 seconds
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 →
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.
References
Related vulnerabilities
Recent vulnerabilities recorded for lmdb.