CVE-2022-2625 Privilege escalation in postgresql

High 8.0 Published Updated

An attacker with schema creation rights can escalate privileges to superuser by manipulating extension creation if an administrator updates the extension.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2022-2625?

CVE-2022-2625 is a high-severity vulnerability in Fedoraproject Fedora, published on 18 Aug 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

A vulnerability was found in PostgreSQL. This attack requires permission to create non-temporary objects in at least one schema, the ability to lure or wait for an administrator to create or update an affected extension in that schema, and the ability to lure or wait for a victim to use the object targeted in CREATE OR REPLACE or CREATE IF NOT EXISTS. Given all three prerequisites, this flaw allows an attacker to run arbitrary code as the victim role, which may be a superuser.

Weakness: CWE-1321, CWE-915

Which versions are affected by CVE-2022-2625?

1 open source package ship an affected version, including postgresql. It affects 3 products.

PackageAffectedFixed in
postgresql BitnamiFrom 10.0.010.22.0, 11.17.0, 12.12.0, 13.8.0, 14.5.0
Linux distribution packages (39)
pg_repack AlmaLinux:8All versions1.4.6-3.module_el8.6.0+2760+1746ec94
pg_repack AlmaLinux:8All versions1.4.6-3.module_el8.6.0+3095+ee60d910
pgaudit AlmaLinux:8All versions1.4.0-5.module_el8.6.0+2758+4f4474df
pgaudit AlmaLinux:8All versions1.4.0-5.module_el8.6.0+3094+eb237fb8
postgres-decoderbufs AlmaLinux:8All versions0.10.0-2.module_el8.6.0+2760+1746ec94
postgres-decoderbufs AlmaLinux:8All versions0.10.0-2.module_el8.6.0+3095+ee60d910
postgresql AlmaLinux:8All versions10.23-1.module_el8.7.0+3379+54d21c26
postgresql AlmaLinux:8All versions12.12-1.module_el8.6.0+3336+e779e518
postgresql-contrib AlmaLinux:8All versions10.23-1.module_el8.7.0+3379+54d21c26
postgresql-contrib AlmaLinux:8All versions12.12-1.module_el8.6.0+3336+e779e518
postgresql-docs AlmaLinux:8All versions10.23-1.module_el8.7.0+3379+54d21c26
postgresql-docs AlmaLinux:8All versions12.12-1.module_el8.6.0+3336+e779e518
postgresql-plperl AlmaLinux:8All versions10.23-1.module_el8.7.0+3379+54d21c26
postgresql-plperl AlmaLinux:8All versions12.12-1.module_el8.6.0+3336+e779e518
postgresql-plpython3 AlmaLinux:8All versions10.23-1.module_el8.7.0+3379+54d21c26
postgresql-plpython3 AlmaLinux:8All versions12.12-1.module_el8.6.0+3336+e779e518
postgresql-pltcl AlmaLinux:8All versions10.23-1.module_el8.7.0+3379+54d21c26
postgresql-pltcl AlmaLinux:8All versions12.12-1.module_el8.6.0+3336+e779e518
postgresql-server AlmaLinux:8All versions10.23-1.module_el8.7.0+3379+54d21c26
postgresql-server AlmaLinux:8All versions12.12-1.module_el8.6.0+3336+e779e518
postgresql-server-devel AlmaLinux:8All versions10.23-1.module_el8.7.0+3379+54d21c26
postgresql-server-devel AlmaLinux:8All versions12.12-1.module_el8.6.0+3336+e779e518
postgresql-static AlmaLinux:8All versions10.23-1.module_el8.7.0+3379+54d21c26
postgresql-static AlmaLinux:8All versions12.12-1.module_el8.6.0+3336+e779e518
postgresql-test AlmaLinux:8All versions10.23-1.module_el8.7.0+3379+54d21c26
postgresql-test AlmaLinux:8All versions12.12-1.module_el8.6.0+3336+e779e518
postgresql-test-rpm-macros AlmaLinux:8All versions10.23-1.module_el8.7.0+3379+54d21c26
postgresql-test-rpm-macros AlmaLinux:8All versions12.12-1.module_el8.6.0+3336+e779e518
postgresql-upgrade AlmaLinux:8All versions10.23-1.module_el8.7.0+3379+54d21c26
postgresql-upgrade AlmaLinux:8All versions12.12-1.module_el8.6.0+3336+e779e518
postgresql-upgrade-devel AlmaLinux:8All versions10.23-1.module_el8.7.0+3379+54d21c26
postgresql-upgrade-devel AlmaLinux:8All versions12.12-1.module_el8.6.0+3336+e779e518
pg_repack Red Hat:enterprise_linux:8::appstreamAll versions0:1.4.6-3.module+el8.5.0+11354+78b3c9c5
pg_repack-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions0:1.4.6-3.module+el8.5.0+11354+78b3c9c5
pg_repack-debugsource Red Hat:enterprise_linux:8::appstreamAll versions0:1.4.6-3.module+el8.5.0+11354+78b3c9c5
pgaudit Red Hat:enterprise_linux:8::appstreamAll versions0:1.4.0-5.module+el8.5.0+11354+78b3c9c5
pgaudit-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions0:1.4.0-5.module+el8.5.0+11354+78b3c9c5
pgaudit-debugsource Red Hat:enterprise_linux:8::appstreamAll versions0:1.4.0-5.module+el8.5.0+11354+78b3c9c5
postgres-decoderbufs Red Hat:enterprise_linux:8::appstreamAll versions0:0.10.0-2.module+el8.5.0+11354+78b3c9c5

Products include Fedoraproject Fedora, Postgresql Postgresql, Redhat Enterprise Linux.

How do I fix CVE-2022-2625?

Upgrade postgresql to a fixed version for your release line: 10.22.0, 11.17.0, 12.12.0 or 13.8.0.

Is CVE-2022-2625 being exploited?

There is no known exploitation of CVE-2022-2625 in the wild and no public exploit code.

All Fedoraproject Fedora vulnerabilities

Sources

Also known as ALPINE-CVE-2022-2625, ALSA-2022:7128, ALSA-2023:0113, AZL-10595, BIT-postgresql-2022-2625, CLEANSTART-2026-TH17193 and 26 more.

Is CVE-2022-2625 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free