CVE-2019-16226: lmdb - Invalid Write Operation in mdb_node_del
Summary
CVE-2019-16226: 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-16226 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-mapped key-value store. It is commonly used for efficient data storage and retrieval in various applications. However, lmdb versions prior to 0.98 are vulnerable to an issue that can lead to an invalid write operation when accessing a data.mdb file supplied by an attacker.
Vulnerability Detail
The vulnerability (CVE-2019-16226) in lmdb arises from a lack of validation in the mdb_node_del function. Specifically, the function fails to validate a memmove operation in the case of an unexpected node->mn_hi value. This flaw can be exploited by an attacker who supplies a malicious data.mdb file, leading to an invalid write operation. The consequences of this vulnerability include potential data corruption, unauthorized modification of stored data, 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 lmdb to mitigate the risk of exploitation.
Conclusion
In conclusion, the lmdb library prior to version 0.98 is vulnerable to an invalid write operation when accessing a malicious data.mdb file. This vulnerability can lead to data corruption, unauthorized data modification, and potential remote code execution. It is crucial to update to lmdb version 0.98 or later to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for lmdb →
FAQ
lmdb is a Python library that provides a high-performance, memory-mapped key-value store. It is commonly used for efficient data storage and retrieval in various applications.
The vulnerability can result in data corruption, unauthorized modification of stored data, and potential remote code execution.
To fix this vulnerability, you should upgrade to lmdb version 0.98 or later using the command 'pip install --upgrade lmdb'.
No, there is no known workaround for this vulnerability. It is essential to update to the fixed version of lmdb.
You can find more information about this vulnerability in the lmdb advisory database: https://github.com/pypa/advisory-database/blob/main/vulns/lmdb/PYSEC-2019-238.yaml
References
Related vulnerabilities
Recent vulnerabilities recorded for lmdb.