CVE-2026-6467
Description
A flaw was found in PostgreSQL. An uncontrolled search path issue in extension management allows an authenticated user with database-level CREATE privileges to execute arbitrary code as the database superuser. By altering schemas or specifying crafted schema names during extension installation or modification, an attacker can cause trusted extension scripts to execute arbitrary SQL commands with elevated privileges.
Statement
This vulnerability is rated as an Important impact because an authenticated user possessing database creation rights can escalate privileges to the database bootstrap superuser, resulting in complete administrative control over the PostgreSQL instance. While the flaw demands pre-existing database credentials with database-level CREATE permissions, the resulting blast radius encompasses full compromise of database confidentiality, integrity, and availability. In standard Red Hat Enterprise Linux deployments, unprivileged users do not receive database-level CREATE permissions by default, limiting exposure to systems configured for non-superuser extension administration or delegated multi-tenant operations.
Mitigation
Revoke database-level CREATE privileges from untrusted roles and restrict network access to the PostgreSQL service.
To prevent non-superusers from creating schemas or installing extensions, revoke the database creation privilege in PostgreSQL:
REVOKE CREATE ON DATABASE <database_name> FROM PUBLIC;
REVOKE CREATE ON DATABASE <database_name> FROM <role_name>;
Additionally, limit network exposure by restricting connections in pg_hba.conf to trusted hosts, or enforce firewall rules via firewalld:
firewall-cmd --permanent --zone=public --remove-service=postgresql
firewall-cmd --reload
If modifying pg_hba.conf, apply configuration changes using:
systemctl reload postgresql
Warning: Reloading the service or applying firewall rules will alter network connectivity and may disconnect clients that are not explicitly permitted. Revoking the CREATE privilege prevents affected accounts from defining new schemas or managing extensions until granted by a superuser.
Common Vulnerability Scoring System (CVSS) Score Details
Info alert:Important note
CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).
The following CVSS metrics and score provided are preliminary and subject to review.
CVSS v3 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 7.2 | N/A | 7.2 |
| Attack Vector | Network | N/A | Network |
| Attack Complexity | Low | N/A | Low |
| Privileges Required | High | N/A | High |
| User Interaction | None | N/A | None |
| Scope | Unchanged | N/A | Unchanged |
| Confidentiality | High | N/A | High |
| Integrity Impact | High | N/A | High |
| Availability Impact | High | N/A | High |
Vector
Red Hat: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
cve.org: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Understanding the Weakness (CWE)
Confidentiality,Integrity,Availability
Technical Impact: Execute Unauthorized Code or Commands
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.