CVE-2018-18482 libpg_query memory leak
A memory leak in the libpg_query library can lead to denial of service, affecting applications using this PostgreSQL query parser.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2018-18482?
CVE-2018-18482 is a medium-severity denial of service vulnerability in n/a, published on 18 Oct 2018. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
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.
Weakness: CWE-772
Which versions are affected by CVE-2018-18482?
6 open source packages ship an affected version, including pg-query and pglast. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
pg-query PyPI | All versions | 0.28 |
pg-query PyPI | All versions | 0.28 |
pg-query PyPI | All versions | 0.28 |
pglast PyPI | All versions | 0.28 |
pglast PyPI | All versions | 0.28 |
pglast PyPI | All versions | 0.28 |
Products include Libpg Query Project Libpg Query.
How do I fix CVE-2018-18482?
Upgrade pg-query to 0.28 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2018-18482 being exploited?
There is no known exploitation of CVE-2018-18482 in the wild and no public exploit code.
Sources
Also known as GHSA-vm3q-58wm-2r2x, PYSEC-2018-154, PYSEC-2026-895.