CVE-2025-8715

NameCVE-2025-8715
DescriptionImproper 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.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
ReferencesDLA-4273-1

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
postgresql-13 (PTS)bullseye13.16-0+deb11u1vulnerable
bullseye (security)13.22-0+deb11u1fixed
postgresql-15 (PTS)bookworm15.14-0+deb12u1fixed
bookworm (security)15.10-0+deb12u1vulnerable
postgresql-17 (PTS)trixie17.6-0+deb13u1fixed
forky, sid17.6-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
postgresql-13sourcebullseye13.22-0+deb11u1DLA-4273-1
postgresql-13source(unstable)(unfixed)
postgresql-15sourcebookworm15.14-0+deb12u1
postgresql-15source(unstable)(unfixed)
postgresql-17sourcetrixie17.6-0+deb13u1
postgresql-17source(unstable)17.6-1

Notes

https://www.postgresql.org/about/news/postgresql-176-1610-1514-1419-1322-and-18-beta-3-released-3118/
https://www.postgresql.org/support/security/CVE-2025-8715/

Search for package or bug name: Reporting problems