CVE-2026-120149 PostgreSQL FDW batch-insert mismatch executes arbitrary code
A malicious foreign server can execute code on the PostgreSQL FDW client via a heap overflow in batch inserts.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Harmful if only installed
- No
- Needs a specific call
- No
- Fix
- Available
What is CVE-2026-120149?
CVE-2026-120149 is a high-severity memory corruption vulnerability in PostgreSQL, published on 12 Nov 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
Heap-based buffer overflow in PostgreSQL foreign batch inserts allows a foreign server to execute arbitrary code, via reporting that it inserted more rows than the server supplied. postgres_fdw can legitimately encounter this when a rule on the remote table expands an INSERT into additional rows. Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.
Weakness: CWE-122
Which versions are affected by CVE-2026-120149?
An affected version is exposed as installed. No special setting or call is needed.
How do I fix CVE-2026-120149?
Upgrade to a fixed version.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2026-120149 being exploited?
There is no known exploitation of CVE-2026-120149 in the wild and no public exploit code.
Sources
Also known as ALPINE-CVE-2026-120149, DEBIAN-CVE-2026-120149, ECHO-9b86-7cea-5034, GHSA-gqm6-3wfg-52x5.