CVE-2022-2625
PostgreSQL vulnerability analysis and mitigation

Overview

A vulnerability (CVE-2022-2625) was discovered in PostgreSQL affecting versions 10.0 through 14.4. The vulnerability was disclosed on August 11, 2022, impacting PostgreSQL's extension script handling mechanism (PostgreSQL News).

Technical details

The vulnerability stems from extension scripts using CREATE OR REPLACE or CREATE IF NOT EXISTS commands without adhering to the documented rule of targeting only objects known to be extension members. The vulnerability has a CVSS v3.1 base score of 8.0 (High), with the vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H (NVD).

Impact

If successfully exploited, this vulnerability allows an attacker to execute arbitrary code as the victim role, which may potentially have superuser privileges. The impact affects both PostgreSQL-bundled and non-bundled extensions (PostgreSQL News).

Exploitability

Exploitation requires three prerequisites: 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 (NVD).

Mitigation and workarounds

PostgreSQL has addressed this vulnerability by blocking the attack in the core server, eliminating the need to modify individual extensions. Fixed versions include PostgreSQL 14.5, 13.8, 12.12, 11.17, and 10.22. Users are advised to upgrade to these patched versions (PostgreSQL News).

Additional resources


SourceThis report was generated using AI

Related PostgreSQL vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-6638HIGH8.8
  • PostgreSQL logoPostgreSQL
  • postgresql18-contrib
NoYesMay 14, 2026
CVE-2026-6637HIGH8.8
  • PostgreSQL logoPostgreSQL
  • postgresql:15::postgres-decoderbufs
NoYesMay 14, 2026
CVE-2026-6479HIGH7.5
  • PostgreSQL logoPostgreSQL
  • postgresql17-upgrade
NoYesMay 14, 2026
CVE-2026-6478MEDIUM6.5
  • PostgreSQL logoPostgreSQL
  • postgresql18-server-devel
NoYesMay 14, 2026
CVE-2026-6575MEDIUM4.3
  • PostgreSQL logoPostgreSQL
  • postgresql16-test-rpm-macros
NoYesMay 14, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management