Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as a database owner
-
DeliveryCreate shadowing operators in search path
-
ExploitPrivileged admin runs vacuumdb --missing-stats-only
-
ExecutionAttacker SQL executes as vacuumdb-running user
-
ImpactFull database compromise / privilege escalation
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V13 - Configuration Search path verification
|
| Exploitation Conditions | Exploitation requires two preconditions that together limit realistic risk: (1) the attacker must hold database-owner privileges on a target database so they can create operators that shadow those used in vacuumdb's --missing-stats-only catalog query, and (2) a higher-privileged user must execute that specific vacuumdb invocation - a path the pg_upgrade documentation actively recommends, which raises exposure during major-version upgrades. It is bounded to PostgreSQL 18.0-18.6 (18.7 is fixed; pre-18 is not affected). Limiting factors: it needs authenticated database ownership (not anonymous/remote access) and an out-of-band privileged vacuumdb run that the attacker does not directly control, so despite the AV:N label it is not remote unauthenticated exploitation against a default configuration. |
| Impact | Severity signals are mixed and point to a credible but conditional insider/privilege-escalation issue rather than a mass-exploitable remote bug. NVD rates it CVSS 7.2 with CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H, and the vuln.today decision label is 'this_week', indicating elevated but not emergency urgency. There is no CISA KEV listing, no EPSS score supplied, and no SSVC decision data in the input, so automatability and widespread-exploitation signals are simply absent - not low, just unprovided. Critically, AV:N conflicts with the real mechanism: the description makes clear that exploitation requires the attacker to already hold database-owner privileges AND for a higher-privileged user to run a specific vacuumdb invocation, so this behaves more like an authenticated local privilege-escalation than an internet-reachable remote flaw - verify the attack-vector interpretation against the mechanism. Note also a privilege mismatch worth flagging to defenders: NVD encodes PR:H, yet owning a database in PostgreSQL is a relatively modest, commonly-granted privilege, which arguably understates how reachable the precondition is. Overall this is a genuine priority for environments that grant database ownership to untrusted or semi-trusted users and that run pg_upgrade/vacuumdb as a superuser, and lower priority where database owners are fully trusted. |
| Exploit ScenarioDerived | A user who owns a database (a low-to-moderate privilege in PostgreSQL) creates operators that shadow those referenced by vacuumdb's --missing-stats-only catalog query within their schema search path. When an administrator later runs that vacuumdb invocation as a superuser - exactly as the pg_upgrade documentation recommends - the attacker's shadowing operators execute attacker-controlled SQL with the superuser's privileges, achieving privilege escalation. No public exploit code was identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 12, 2026
Arbitrary SQL execution in PostgreSQL 18.0 through 18.6 occurs when vacuumdb --missing-stats-only resolves operators that a database owner has shadowed, allowing that owner to run SQL with the privileges of the database user executing vacuumdb. Exploitation is authenticated and conditional: the attacker needs database-owner rights, and a higher-privileged user must run the affected vacuumdb invocation-a step the pg_upgrade documentation recommends, increasing exposure during major-version upgrades. No public exploit was identified at time of analysis, and the issue is not remote unauthenticated exploitation against a default configuration.
RemediationAI
Vendor-released patch: PostgreSQL 18.7. Upgrade all PostgreSQL 18.x installations to 18.7 or later; PostgreSQL releases before 18 do not need this fix. Because the pg_upgrade documentation recommends an affected vacuumdb invocation, update any major-version upgrade runbooks to use 18.7 before executing vacuumdb --missing-stats-only. If immediate upgrade is not possible, restrict execution of vacuumdb --missing-stats-only to trusted database users and review database-owner-created operators that could shadow those used by the catalog query, noting that updating to 18.7 is the complete fix. The vuln.today priority is this_week, so schedule the 18.7 upgrade within the current weekly remediation cycle. Vendor advisory: https://www.postgresql.org/support/security/CVE-2026-116313/.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
CVE-2026-116313 is an untrusted search path (CWE-426) issue in the PostgreSQL vacuumdb client tool, specifically in the catalog query used by --missing-stats-only. PostgreSQL resolves operators through the search path; a database owner can create an operator that shadows the operator expected by vacuumdb's query, so when a higher-privileged user runs that invocation, the query executes attacker-supplied SQL under that user's database privileges. The authoritative assessed vector is CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H: network reachability is labeled, but exploitation requires an authenticated database owner (PR:L) plus a separate higher-privileged vacuumdb run, which is why attack complexity is high and the issue is not unauthenticated remote exploitation. The flaw is bounded to PostgreSQL 18.0-18.6; 18.7 is fixed, and releases before 18 are unaffected. Because pg_upgrade documentation recommends an affected vacuumdb invocation, major-version upgrade workflows are the main exposure path.
Know when PostgreSQL gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Database ownership is a modest, commonly-granted privilege (PR:L), but success depends on a privileged user running the specific vacuumdb query, which is outside attacker control (AC:H); arbitrary SQL as that user yields full C/I/A impact.
Primary rating from Vendor (PostgreSQL).
CVSS VectorVendor: PostgreSQL
Lifecycle Timeline
2DescriptionCVE.org
Untrusted search path in PostgreSQL vacuumdb allows a database owner to execute arbitrary SQL as the database user running vacuumdb, via shadowing operators used in the --missing-stats-only catalog query. The pg_upgrade documentation recommends an affected vacuumdb invocation. Within major version 18, minor versions before PostgreSQL 18.7 are affected. Versions before PostgreSQL 18 are unaffected.
Articles & Coverage 1
Executive ViewAI
CVE-2026-116313 is a high-severity flaw in PostgreSQL 18.0-18.6 that lets a database owner escalate privileges by exploiting the vacuumdb utility when run by a higher-privileged user, a scenario explicitly recommended during major version upgrades. Because this intersects with routine pg_upgrade operations, organizations planning or performing upgrades to PostgreSQL 18 face elevated risk of unauthorized SQL execution with elevated privileges, potentially compromising data integrity and confidentiality. Leadership should prioritize this during upgrade windows and enforce least-privilege principles for database roles.
No vendor-released patch identified at time of analysis. Interim mitigations: avoid running vacuumdb --missing-stats-only as a high-privilege user; restrict database-owner roles to trusted accounts; run vacuumdb under a dedicated low-privilege OS user; monitor for anomalous SQL execution during upgrades; apply least-privilege principles to all database roles.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
More in PostgreSQL
View allPostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl
An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl
Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9, and 9.0.x before 9.0.13 allows re
Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.
Unauthenticated SQL injection in Sangoma Switchvox SMB Edition 8.3 (build 104997) lets remote attackers execute arbitrar
PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to incorrect authentication flaw allow
The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t
A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra
In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve
Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the
Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot
Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al
EUVD-2026-124493
GHSA-64m9-jq4j-66v4
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB