# CVE-2019-16227: py-lmdb Invalid write operation

- Severity: Critical 9.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.03%, higher than 81% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2019-09-11T14:47:02.000Z
- Modified: 2026-06-17T02:21:56.420Z
- Also known as: GHSA-pf3p-v9xp-mrvf, PYSEC-2019-239
- Weaknesses: CWE-787
- Assigned by: mitre

## Description

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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- lmdb (PyPI): up to 0.97; before 0.98
- py-lmdb_project py-lmdb: up to 0.97

## Every score

- GitHub: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:4.0 Critical `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`

## References

- <https://github.com/TeamSeri0us/pocs/tree/master/lmdb/lmdb%20memcpy%20illegal%20dst> (exploit, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2019-16227> (advisory)
- <https://github.com/jnwatson/py-lmdb> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/lmdb/PYSEC-2019-239.yaml> (web)
- <https://pypi.org/project/lmdb> (package, web)
- <https://github.com/advisories/GHSA-pf3p-v9xp-mrvf> (advisory)

## Sources

- CVE List: [CVE-2019-16227](https://www.cve.org/CVERecord?id=CVE-2019-16227), CVE Terms of Use, modified 2024-08-05
- GitHub Advisory Database: [GHSA-pf3p-v9xp-mrvf](https://github.com/advisories/GHSA-pf3p-v9xp-mrvf), CC-BY-4.0, modified 2024-09-30
- NVD: [CVE-2019-16227](https://nvd.nist.gov/vuln/detail/CVE-2019-16227), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2019-239](https://osv.dev/vulnerability/PYSEC-2019-239), CC-BY-4.0, modified 2026-06-10

---

Page: https://cve.day/CVE-2019-16227 · Whole record: https://cve.day/CVE-2019-16227.json · Rebuilt by cve.day 2026-11-25T22:57:46.910Z
