CVE-2019-16226: lmdb - Invalid Write Operation in mdb_node_del

lmdb Updated 02 Oct 2025

Summary

11/09/2019
Yes i
High
7.5

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

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.

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-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 →

Share this vulnerability

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.

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