MEDIUM6.5
PYSEC-2026-895
libpg_query memory leak
Quick fix
PYSEC-2026-895 — pglast: upgrade to the fixed version with the command below.
pip install --upgrade 'pglast>=0.28'Details
An issue was discovered in libpg_query 10-1.0.2. There is a memory leak in pg_query_raw_parse in pg_query_parse.c, which might lead to a denial of service.
Are you affected?
Enter the version of the package you're using.
Affected packages
References
- https://nvd.nist.gov/vuln/detail/CVE-2018-18482[ADVISORY]
- https://github.com/lfittl/libpg_query/issues/49[WEB]
- https://github.com/lelit/pglast[PACKAGE]
- https://github.com/pypa/advisory-database/tree/main/vulns/pg-query/PYSEC-2018-154.yaml[WEB]
- https://pypi.org/project/pglast[PACKAGE]
- https://github.com/advisories/GHSA-vm3q-58wm-2r2x[ADVISORY]