CVE-2026-120153 PUBLISHED

PostgreSQL extension-script substitutions allow SQL injection through object names

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

SQL injection in PostgreSQL extension-script substitutions allows an attacker with database-level CREATE privilege to execute arbitrary code as the bootstrap superuser, via a schema or owner name containing newlines or other special substrings. This is similar to CVE-2023-39417, but it requires a non-bundled extension with a vulnerable script pattern. 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:H/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 7.2

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

attacker has database-level CREATE privilege, and administrator has installed the files of a vulnerable non-bundled extension

Credits

  • The PostgreSQL project thanks Anthropic OSS program, Sven Klemm, and Aaron chen for reporting this problem.

References

Problem Types

  • Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') CWE