CVE-2020-1720 in PostgreSQL
Summary
by MITRE
A flaw was found in PostgreSQL's "ALTER ... DEPENDS ON EXTENSION", where sub-commands did not perform authorization checks. An authenticated attacker could use this flaw in certain configurations to perform drop objects such as function, triggers, et al., leading to database corruption. This issue affects PostgreSQL versions before 12.2, before 11.7, before 10.12 and before 9.6.17.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 05/20/2025
This vulnerability resides in PostgreSQL's handling of dependency management within database objects, specifically within the ALTER ... DEPENDS ON EXTENSION command. The flaw represents a critical authorization bypass that allows authenticated users to manipulate database objects without proper privileges, fundamentally undermining the database's security model. The vulnerability exists because sub-commands within the ALTER ... DEPENDS ON EXTENSION statement fail to perform adequate authorization checks, creating a pathway for privilege escalation attacks.
The technical implementation of this vulnerability stems from insufficient access control validation during dependency management operations. When users execute ALTER ... DEPENDS ON EXTENSION commands, the system should verify that the authenticated user possesses appropriate permissions to modify the target objects. However, this authorization check is bypassed for sub-commands, allowing attackers to manipulate database objects such as functions, triggers, and other schema elements. This authorization failure directly maps to CWE-284 Access Control Issues, specifically the weakness where insufficient authorization checks allow unauthorized modifications to critical database components.
The operational impact of this vulnerability extends beyond simple privilege escalation to encompass potential database corruption and service disruption. An authenticated attacker with minimal privileges could leverage this flaw to drop critical database objects, effectively compromising database integrity and availability. This attack vector is particularly dangerous because it operates within legitimate database management commands, making it difficult to detect through standard monitoring systems. The vulnerability affects multiple PostgreSQL versions, creating widespread exposure across different deployment environments and complicating remediation efforts.
The attack scenario typically involves an authenticated user who can execute ALTER ... DEPENDS ON EXTENSION commands but lacks direct privileges to drop database objects. By exploiting this authorization bypass, the attacker can manipulate object dependencies to achieve unauthorized deletion of functions, triggers, or other database components. This capability can lead to complete database corruption or service disruption, depending on which objects are targeted. The vulnerability's impact is further amplified by its presence across multiple PostgreSQL version lines, including major releases that are widely deployed in production environments.
Organizations should prioritize immediate patching of affected PostgreSQL installations to address this vulnerability, as the flaw enables unauthorized database object manipulation without proper authorization checks. The recommended mitigation strategy includes upgrading to PostgreSQL versions 12.2, 11.7, 10.12, or 9.6.17, which contain the necessary fixes for the authorization bypass. Additionally, database administrators should implement strict access controls and monitor for unusual ALTER ... DEPENDS ON EXTENSION operations, as these commands can serve as attack vectors for privilege escalation. This vulnerability aligns with ATT&CK technique T1078 Valid Accounts, where attackers leverage legitimate database accounts to perform unauthorized operations through command injection and privilege escalation pathways.