CVEfocus › CVE database › CVE-2022-2625

CVE-2022-2625

EPSS 1.6% (higher than 77% of CVEs)Published 2022-08-18Updated 2026-11-02Assigner: redhat

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.

CWE-915

What to do

Fixed builds are available from AlmaLinux, Alpine, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

88Fixed
1Fix pending
24Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 22.04postgresql-14Fixed14.5-0ubuntu0.22.04.1UBUNTU-CVE-2022-2625
Ubuntu 20.04postgresql-12Fixed12.12-0ubuntu0.20.04.1UBUNTU-CVE-2022-2625
Ubuntu 18.04postgresql-10Fixed10.22-0ubuntu0.18.04.1UBUNTU-CVE-2022-2625
Ubuntu 16.04postgresql-9.5Will not fix
PostgreSQL 9.3 is end of life upstream, and no updates are are available. Marking as deferred in -esm-main releases. PostgreSQL 9.5 is not being maintained by…
UBUNTU-CVE-2022-2625
Ubuntu 14.04postgresql-9.1Will not fix
PostgreSQL 9.3 is end of life upstream, and no updates are are available. Marking as deferred in -esm-main releases. PostgreSQL 9.5 is not being maintained by…
Ubuntu 14.04postgresql-9.3Fix pendingUBUNTU-CVE-2022-2625
Red Hat Enterprise Linux 9postgresqlFixed0:13.10-1.el9_1RHSA-2023:1693
Red Hat Enterprise Linux 9postgresql-contribFixed0:13.10-1.el9_1RHSA-2023:1693
Red Hat Enterprise Linux 9postgresql-docsFixed0:13.10-1.el9_1RHSA-2023:1693
Red Hat Enterprise Linux 9postgresql-plperlFixed0:13.10-1.el9_1RHSA-2023:1693
Red Hat Enterprise Linux 9postgresql-plpython3Fixed0:13.10-1.el9_1RHSA-2023:1693
Red Hat Enterprise Linux 9postgresql-pltclFixed0:13.10-1.el9_1RHSA-2023:1693
Red Hat Enterprise Linux 9postgresql-private-develFixed0:13.10-1.el9_1RHSA-2023:1693
Red Hat Enterprise Linux 9postgresql-private-libsFixed0:13.10-1.el9_1RHSA-2023:1693
Red Hat Enterprise Linux 9postgresql-serverFixed0:13.10-1.el9_1RHSA-2023:1693
Red Hat Enterprise Linux 9postgresql-server-develFixed0:13.10-1.el9_1RHSA-2023:1693
Red Hat Enterprise Linux 9postgresql-staticFixed0:13.10-1.el9_1RHSA-2023:1693
Red Hat Enterprise Linux 9postgresql-testFixed0:13.10-1.el9_1RHSA-2023:1693
Red Hat Enterprise Linux 9postgresql-upgradeFixed0:13.10-1.el9_1RHSA-2023:1693
Red Hat Enterprise Linux 9postgresql-upgrade-develFixed0:13.10-1.el9_1RHSA-2023:1693
Red Hat Enterprise Linux 8pg_repackFixed0:1.4.6-3.module+el8.5.0+11357+bcc62552RHSA-2022:7128
Red Hat Enterprise Linux 8pgauditFixed0:1.5.0-1.module+el8.4.0+8873+b821c30aRHSA-2022:7128
Red Hat Enterprise Linux 8postgres-decoderbufsFixed0:0.10.0-2.module+el8.4.0+8873+b821c30aRHSA-2022:7128
Red Hat Enterprise Linux 8postgresqlFixed0:12.12-1.module+el8.6.0+16796+0abe6678RHSA-2023:1576
Red Hat Enterprise Linux 8postgresql-contribFixed0:12.12-1.module+el8.6.0+16796+0abe6678RHSA-2023:0113
Red Hat Enterprise Linux 8postgresql-docsFixed0:10.23-1.module+el8.7.0+17280+3a452e1fRHSA-2023:1576
Red Hat Enterprise Linux 8postgresql-plperlFixed0:12.12-1.module+el8.6.0+16796+0abe6678RHSA-2023:1576
Red Hat Enterprise Linux 8postgresql-plpython3Fixed0:13.10-1.module+el8.7.0+18279+1ca8cf12RHSA-2022:7128
Red Hat Enterprise Linux 8postgresql-pltclFixed0:13.10-1.module+el8.7.0+18279+1ca8cf12RHSA-2023:0113
Red Hat Enterprise Linux 8postgresql-serverFixed0:10.23-1.module+el8.7.0+17280+3a452e1fRHSA-2022:7128
Red Hat Enterprise Linux 8postgresql-server-develFixed0:12.12-1.module+el8.6.0+16796+0abe6678RHSA-2023:1576
Red Hat Enterprise Linux 8postgresql-staticFixed0:12.12-1.module+el8.6.0+16796+0abe6678RHSA-2023:0113
Red Hat Enterprise Linux 8postgresql-testFixed0:10.23-1.module+el8.7.0+17280+3a452e1fRHSA-2023:1576
Red Hat Enterprise Linux 8postgresql-test-rpm-macrosFixed0:10.23-1.module+el8.7.0+17280+3a452e1fRHSA-2022:7128
Red Hat Enterprise Linux 8postgresql-upgradeFixed0:10.23-1.module+el8.7.0+17280+3a452e1fRHSA-2022:7128
Red Hat Enterprise Linux 8postgresql-upgrade-develFixed0:12.12-1.module+el8.6.0+16796+0abe6678RHSA-2023:0113
Red Hat Enterprise Linux 7postgresqlWill not fix
Out of support scope
Red Hat Enterprise Linux 7postgresql-contribWill not fix
Out of support scope
Red Hat Enterprise Linux 7postgresql-develWill not fix
Out of support scope
Red Hat Enterprise Linux 7postgresql-docsWill not fix
Out of support scope
Red Hat Enterprise Linux 7postgresql-libsWill not fix
Out of support scope
Red Hat Enterprise Linux 7postgresql-plperlWill not fix
Out of support scope
Red Hat Enterprise Linux 7postgresql-plpythonWill not fix
Out of support scope
Red Hat Enterprise Linux 7postgresql-pltclWill not fix
Out of support scope
Red Hat Enterprise Linux 7postgresql-serverWill not fix
Out of support scope
Red Hat Enterprise Linux 7postgresql-staticWill not fix
Out of support scope
Red Hat Enterprise Linux 7postgresql-testWill not fix
Out of support scope
Red Hat Enterprise Linux 7postgresql-upgradeWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresqlWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-contribWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-develWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-docsWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-libsWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-plperlWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-plpythonWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-pltclWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-serverWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-testWill not fix
Out of support scope
AlmaLinux 9postgresqlFixed13.10-1.el9_1ALSA-2023:1693
AlmaLinux 9postgresql-contribFixed13.10-1.el9_1ALSA-2023:1693
AlmaLinux 9postgresql-docsFixed13.10-1.el9_1ALSA-2023:1693
AlmaLinux 9postgresql-plperlFixed13.10-1.el9_1ALSA-2023:1693
AlmaLinux 9postgresql-plpython3Fixed13.10-1.el9_1ALSA-2023:1693
AlmaLinux 9postgresql-pltclFixed13.10-1.el9_1ALSA-2023:1693
AlmaLinux 9postgresql-private-develFixed13.10-1.el9_1ALSA-2023:1693
AlmaLinux 9postgresql-private-libsFixed13.10-1.el9_1ALSA-2023:1693
AlmaLinux 9postgresql-serverFixed13.10-1.el9_1ALSA-2023:1693
AlmaLinux 9postgresql-server-develFixed13.10-1.el9_1ALSA-2023:1693
AlmaLinux 9postgresql-staticFixed13.10-1.el9_1ALSA-2023:1693
AlmaLinux 9postgresql-testFixed13.10-1.el9_1ALSA-2023:1693
AlmaLinux 9postgresql-upgradeFixed13.10-1.el9_1ALSA-2023:1693
AlmaLinux 9postgresql-upgrade-develFixed13.10-1.el9_1ALSA-2023:1693
AlmaLinux 8pg_repackFixed1.4.6-3.module_el8.6.0+3095+ee60d910ALSA-2022:7128
AlmaLinux 8pgauditFixed1.5.0-1.module_el8.6.0+2760+1746ec94ALSA-2022:7128
AlmaLinux 8postgres-decoderbufsFixed0.10.0-2.module_el8.6.0+2760+1746ec94ALSA-2022:7128
AlmaLinux 8postgresqlFixed12.12-1.module_el8.6.0+3336+e779e518ALSA-2023:0113
AlmaLinux 8postgresql-contribFixed12.12-1.module_el8.6.0+3336+e779e518ALSA-2023:0113
AlmaLinux 8postgresql-docsFixed12.12-1.module_el8.6.0+3336+e779e518ALSA-2023:0113
AlmaLinux 8postgresql-plperlFixed13.10-1.module_el8.7.0+3498+cb1ef3c6ALSA-2023:0113
AlmaLinux 8postgresql-plpython3Fixed12.12-1.module_el8.6.0+3336+e779e518ALSA-2023:1576
AlmaLinux 8postgresql-pltclFixed10.23-1.module_el8.7.0+3379+54d21c26ALSA-2022:7128
AlmaLinux 8postgresql-serverFixed12.12-1.module_el8.6.0+3336+e779e518ALSA-2023:0113
AlmaLinux 8postgresql-server-develFixed10.23-1.module_el8.7.0+3379+54d21c26ALSA-2023:1576
AlmaLinux 8postgresql-staticFixed13.10-1.module_el8.7.0+3498+cb1ef3c6ALSA-2023:0113
AlmaLinux 8postgresql-testFixed13.10-1.module_el8.7.0+3498+cb1ef3c6ALSA-2022:7128
AlmaLinux 8postgresql-test-rpm-macrosFixed13.10-1.module_el8.7.0+3498+cb1ef3c6ALSA-2023:0113
AlmaLinux 8postgresql-upgradeFixed13.10-1.module_el8.7.0+3498+cb1ef3c6ALSA-2022:7128
AlmaLinux 8postgresql-upgrade-develFixed13.10-1.module_el8.7.0+3498+cb1ef3c6ALSA-2022:7128
Rocky Linux 8pg_repackFixed0:1.4.6-3.module+el8.5.0+684+c3892ef9RLSA-2023:1576
Rocky Linux 8pgauditFixed0:1.4.0-5.module+el8.5.0+686+20453eccRLSA-2023:1576
Rocky Linux 8postgres-decoderbufsFixed0:0.10.0-2.module+el8.4.0+424+71d47d9aRLSA-2022:7128
Rocky Linux 8postgresqlFixed0:10.23-1.module+el8.7.0+1118+c6c6f44aRLSA-2023:1576
Alpine Linux 3.20postgresql14Fixed14.5-r0ALPINE-CVE-2022-2625
Alpine Linux 3.20postgresql15Fixed14.5-r0ALPINE-CVE-2022-2625
Alpine Linux 3.19postgresql13Fixed13.8-r0ALPINE-CVE-2022-2625
Alpine Linux 3.19postgresql14Fixed14.5-r0ALPINE-CVE-2022-2625
Alpine Linux 3.19postgresql15Fixed14.5-r0ALPINE-CVE-2022-2625
Alpine Linux 3.18postgresql12Fixed12.12-r0ALPINE-CVE-2022-2625
Alpine Linux 3.18postgresql13Fixed13.8-r0ALPINE-CVE-2022-2625
Alpine Linux 3.18postgresql14Fixed14.5-r0ALPINE-CVE-2022-2625
Alpine Linux 3.18postgresql15Fixed14.5-r0ALPINE-CVE-2022-2625
Alpine Linux 3.17postgresql12Fixed12.12-r0ALPINE-CVE-2022-2625
Alpine Linux 3.17postgresql13Fixed13.8-r0ALPINE-CVE-2022-2625
Alpine Linux 3.17postgresql14Fixed14.5-r0ALPINE-CVE-2022-2625
Alpine Linux 3.17postgresql15Fixed14.5-r0ALPINE-CVE-2022-2625
Alpine Linux 3.16postgresql12Fixed12.12-r0ALPINE-CVE-2022-2625
Alpine Linux 3.16postgresql13Fixed13.8-r0ALPINE-CVE-2022-2625
Alpine Linux 3.16postgresql14Fixed14.5-r0ALPINE-CVE-2022-2625
Alpine Linux 3.15postgresql12Fixed12.12-r0ALPINE-CVE-2022-2625
Alpine Linux 3.15postgresql13Fixed13.8-r0ALPINE-CVE-2022-2625
Alpine Linux 3.15postgresql14Fixed14.5-r0ALPINE-CVE-2022-2625
Alpine Linux 3.14postgresqlFixed13.8-r0ALPINE-CVE-2022-2625
Alpine Linux 3.13postgresqlFixed13.8-r0ALPINE-CVE-2022-2625

What the vendor says

As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.