PostgreSQL code execution in foreign batch inserts
PostgreSQL
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| PostgreSQL |
| No fix yet |
Original 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.