CVE-2019-16227: py-lmdb Out-of-Bounds Write
CVE-2019-16227 is a critical out-of-bounds write vulnerability in py-lmdb, published in the National Vulnerability Database (NVD) on September 11, 2019. It carries a CVSS v3.1 base score of 9.8 (Critical). According to its CVSS vector, it can be exploited over the network, needs no privileges and no user interaction.
What is CVE-2019-16227?
Using py-lmdb's mdb_cursor_set may lead to memory corruption via crafted data.mdb files.
The NVD description reads:
An issue was discovered in py-lmdb 0.97. For certain values of mn_flags, mdb_cursor_set triggers a memcpy with an invalid write operation within mdb_xcursor_init1. NOTE: this outcome occurs when accessing a data.mdb file supplied by an attacker.
NVD maps this issue to CWE-787 (Out-of-bounds Write).
Affected versions and packages
NVD's CPE configuration lists these vulnerable version ranges:
- py-lmdb through 0.97
Echo's advisory data tracks 1 package for CVE-2019-16227: liblmdb0.
Echo-built fixed versions recorded for this CVE:
- liblmdb0: 0.9.31-1+e1, 0.9.31-1+e2
Severity and CVSS score
A score of 9.8 puts CVE-2019-16227 in the Critical range (9.0 to 10.0), the highest CVSS band. The vector shows the attack path and the impact on confidentiality, integrity and availability. For help weighing exploit likelihood against raw severity, see our guide to how to deal with CVE backlogs.
Impact: Out-of-Bounds Write
The CVSS vector rates the impact on confidentiality as high, integrity as high and availability as high. Exploitation requires no privileges and no user interaction, and the attacker reaches the target over the network.
What this means in practice depends on how py-lmdb is used in your environment: how widely it is deployed, whether the affected code path is reachable, and what the process can access. Treat the exposed systems that run a listed version as in scope until you have confirmed otherwise.
Is CVE-2019-16227 being exploited in the wild?
Known exploitation: CISA KEV
No. As of November 4, 2026, CVE-2019-16227 is not listed in CISA's Known Exploited Vulnerabilities (KEV) catalog (catalog version 2026.11.03). KEV only lists vulnerabilities with confirmed exploitation, so absence from the catalog is not proof that nobody is exploiting the flaw.
EPSS score and percentile
The Exploit Prediction Scoring System (EPSS) from FIRST estimates the probability that a CVE will see exploitation activity in the next 30 days. On November 3, 2026, CVE-2019-16227 had an EPSS score of 0.020, which corresponds to a probability of 2.0%. It sits at the 81st percentile, which means it is scored as more likely to be exploited than roughly 81% of scored CVEs, placing it above the median of scored CVEs. EPSS is recalculated daily and is a likelihood estimate, not a confirmation, so read it together with KEV status, exposure and CVSS severity.
Attack vector, complexity, privileges and user interaction
Based on the CVSS v3.1 vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (source: NVD), this is how an attacker has to approach CVE-2019-16227:
- Attack vector: Network (AV:N): the flaw can be reached remotely over the network, so the attacker does not need to be on the same host or LAN.
- Attack complexity: Low (AC:L): no special conditions are needed, so the attack can be repeated reliably.
- Privileges required: None (PR:N): no account or credentials are needed.
- User interaction: None (UI:N): no action by a user is required.
- Scope: Unchanged (S:U): the impact stays within the security scope of the vulnerable component.
Is there a public proof of concept or exploit?
NVD also tags 1 reference as exploit-related ("Exploit" tag), meaning the page describes how the flaw can be exploited and may include proof-of-concept details: https://github.com/TeamSeri0us/pocs/tree/master/lmdb/lmdb%20memcpy%20illegal%20dst. This reflects NVD and CISA records as of November 4, 2026, and public exploit code can appear at any time.
Practical exposure conditions
- Only systems that run an affected version are exposed. Compare the py-lmdb versions in your hosts and container images against the vulnerable ranges listed above.
- The vector is network-based, so py-lmdb deployments that process input from untrusted networks carry the most risk, especially internet-facing ones. Internal-only deployments are still exposed to anyone who can reach them.
- No credentials are needed, so exposure does not depend on how well accounts are protected.
- No user has to click or open anything, so the flaw can be triggered without any user action.
How to fix CVE-2019-16227
- Inventory. Find every host, container image and base image that includes py-lmdb, including the packages listed above (liblmdb0).
- Upgrade. Install the Echo-built fixed package listed above for your package name.
- Rebuild and restart. Rebuild container images and restart the services that load py-lmdb so the patched code is actually used.
- Verify. Re-scan your images and hosts to confirm that no package still matches a vulnerable version of CVE-2019-16227.
Interim mitigations if you cannot patch immediately
These are general hardening steps, not a vendor-specific workaround. Updating is the only complete fix.
- Restrict network access to services that use py-lmdb to trusted sources with firewall rules or allow-lists until you can patch.
- Monitor logs and runtime behavior on affected systems for unusual activity, and prioritize them in your next patch window.
How Echo helps with CVE-2019-16227
Echo is a registered CVE Numbering Authority (CNA) and ships patched, vetted open source packages and container images, so teams can remove vulnerable components instead of tracking an endless backlog. For this CVE, Echo's advisory data tracks 1 package (liblmdb0) and includes Echo-built fixed versions. Read how automated patch SLAs reduce enterprise risk in how automated patch SLAs reduce enterprise risk and why how to deal with CVE backlogs matters. Related py-lmdb advisories: CVE-2019-16224 and CVE-2019-16225.
Frequently asked questions about CVE-2019-16227
What is CVE-2019-16227?
CVE-2019-16227 is a critical out-of-bounds write vulnerability in py-lmdb. Using py-lmdb's mdb_cursor_set may lead to memory corruption via crafted data.mdb files. It has a CVSS base score of 9.8.
Which versions are affected by CVE-2019-16227?
NVD lists these vulnerable ranges: py-lmdb through 0.97.
Is CVE-2019-16227 actively exploited?
It is not listed in CISA's KEV catalog as of November 4, 2026 (catalog version 2026.11.03), but that does not rule out exploitation. FIRST's EPSS model puts the probability of exploitation activity in the next 30 days at 2.0%, at the 81st percentile (November 3, 2026). On public exploit code: NVD tags 1 reference as exploit-related.
How do I fix CVE-2019-16227?
Install the Echo-built fixed package listed above for your package name. Then rebuild images, restart affected services and re-scan to confirm the fix.
How severe is CVE-2019-16227?
It is rated Critical with a CVSS base score of 9.8. The vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H means it can be exploited over the network, with no privileges and no user interaction.
Are there other py-lmdb vulnerabilities I should patch?
Yes. Echo's advisory data also covers CVE-2019-16224 and CVE-2019-16225. Patch them together to reduce the number of upgrade cycles.