CVE-2019-16225
Description
In CVE-2019-16225, py-lmdb 0.97's mdb_page_touch function improperly sets up mc->mc_pg[mc->top] for certain mp_flags values, leading to an invalid write operation when processing a crafted data.mdb file.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
In CVE-2019-16225, py-lmdb 0.97's mdb_page_touch function improperly sets up mc->mc_pg[mc->top] for certain mp_flags values, leading to an invalid write operation when processing a crafted data.mdb file.
Vulnerability
Analysis
CVE-2019-16225 is a vulnerability in py-lmdb version 0.97, a Python binding for the LMDB database [1][4]. The issue lies in the mdb_page_touch function which, for certain values of mp_flags, does not correctly initialize the mc->mc_pg[mc->top] field [1]. This results in an invalid write operation when the library tries to access or modify a page in the memory-mapped database [1].
The attack surface is limited to scenarios where an attacker can supply a malicious data.mdb file [1]. Exploitation requires the victim to open and process this file using a vulnerable version of py-lmdb [1][2]. The exact mp_flags values that trigger this condition are not publicly detailed, but the issue was demonstrated in a proof-of-concept repository [2].
A successful exploit could lead to memory corruption, potentially allowing further exploitation such as arbitrary code execution or denial of service [1][2]. The flaw is classified as a "write to illegal address" [2], indicating that an attacker-controlled write beyond allocated memory boundaries is possible.
Mitigation
Users are advised to upgrade to a patched version of py-lmdb. The project's advisory database indicates that versions after 0.97 have addressed this issue [3]. No official workarounds have been published; the safest mitigation is to avoid opening untrusted data.mdb files with vulnerable software [1].
AI Insight generated on May 22, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
lmdbPyPI | <= 0.97 | — |
Affected products
3- py-lmdb/py-lmdbdescription
- ghsa-coords2 versions
<= 0.97+ 1 more
- (no CPE)range: <= 0.97
- (no CPE)range: < 2.1.1-1.1
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
5- github.com/advisories/GHSA-c74c-p4p7-r8q5ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2019-16225ghsaADVISORY
- github.com/TeamSeri0us/pocs/tree/master/lmdb/lmdb%20write%20to%20illegal%20addressghsax_refsource_MISCWEB
- github.com/pypa/advisory-database/tree/main/vulns/lmdb/PYSEC-2019-237.yamlghsaWEB
- pypi.org/project/lmdbghsaWEB
News mentions
0No linked articles in our index yet.