{"id":"CVE-2025-8715","published":"2025-08-14T13:00:07Z","modified":"2026-02-26T17:48:36Z","title":"PostgreSQL pg_dump newline in object name executes arbitrary code in psql client and in restore target server","vendor":null,"product":null,"tier":"tail","description":{"text":"Improper neutralization of newlines in pg_dump in PostgreSQL allows a user of the origin server to inject arbitrary code for restore-time execution as the client operating system account running psql to restore the dump, via psql meta-commands inside a purpose-crafted object name.  The same attacks can achieve SQL injection as a superuser of the restore target server.  pg_dumpall, pg_restore, and pg_upgrade are also affected.  Versions before PostgreSQL 17.6, 16.10, 15.14, 14.19, and 13.22 are affected.  Versions before 11.20 are unaffected.  CVE-2012-0868 had fixed this class of problem, but version 11.20 reintroduced it.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00493,"percentile":0.43246,"provenance":"source"},"cwes":[{"id":"CWE-93","name":"Improper Neutralization of CRLF Sequences"}],"references":[{"url":"https://www.postgresql.org/support/security/CVE-2025-8715/","tags":[]}],"priority":{"score":14.8,"factors":[{"name":"EPSS percentile","points":8.65},{"name":"CVSS severity","points":6.16}]},"affectedVersions":[{"vendor":"n/a","product":"PostgreSQL","versions":[">= 17, < 17.6",">= 16, < 16.10",">= 15, < 15.14",">= 14, < 14.19",">= 11.20, < 13.22"]}],"workarounds":{"items":["To block attacks against the psql client, use \"pg_restore --dbname\" instead of restore methods that involve \"psql\". To block SQL injection against the restore target server, revoke the CREATE permission from non-superusers at the origin server."],"from":"CVE.org CNA","provenance":"source"},"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2025-08-15T03:55:57.753539Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2025-24809","exploited":false,"provenance":"source"}}