PostgreSQL 12.2, 11.7, 10.12, 9.6.17, 9.5.21, and 9.4.26 Released CVE-2020-1720
The ALTER ... DEPENDS ON EXTENSION sub-commands lacked authorization checks, allowing an unprivileged user to drop functions, procedures, materialized views, indexes, or triggers under certain conditions.
postgresql.org
Published on postgresql.org
The PostgreSQL Global Development Group has released an update to all supported versions of our database system, including 12.2, 11.7, 10.12, 9.6.17, 9.5.21, and 9.4.26. This release fixes one security issue found in the PostgreSQL server and over 75 bugs reported over the last three months.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the ALTER ... DEPENDS ON EXTENSION sub-commands were implemented without verifying that the user has the necessary privileges to modify the dependent objects.
Impact
An unprivileged user could drop functions, procedures, materialized views, indexes, or triggers, potentially causing data loss or denial of service, but only under specific conditions involving an installed extension and the ability to create objects or trigger DROP EXTENSION.
What the attacker needed
An extension is installed by an administrator; unprivileged user can CREATE or extension owner runs DROP…
The fix
The issue was fixed in this release by adding the missing authorization checks.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
In PostgreSQL, some commands let you link database objects to an extension. Normally only privileged users should be able to change these links. Because the check was missing, a regular user could remove important database objects, which could break the database or cause data loss.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.