CVE-2026-120149 PUBLISHED

PostgreSQL FDW batch-insert mismatch executes arbitrary code

Assigner: PostgreSQL
Reserved: 30.10.2026 Published: 12.11.2026 Updated: 12.11.2026

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.

Metrics

CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 8.8

Product Status

Vendor n/a
Product PostgreSQL
Versions Default: unaffected
  • affected from 18 to 18.7 (excl.)
  • affected from 17 to 17.12 (excl.)
  • affected from 16 to 16.16 (excl.)
  • affected from 15 to 15.20 (excl.)
  • affected from 0 to 14.25 (excl.)

Affected Configurations

Superuser previously issued "CREATE EXTENSION postgres_fdw"; attacker has local permission to create objects (temporary objects or non-temporary objects in at least one schema); attacker has remote-server permission to create non-temporary objects in at least one schema.

Credits

  • The PostgreSQL project thanks Sumedh Pathak and Sven Klemm for reporting this problem.

References

Problem Types

  • Heap-based Buffer Overflow CWE