PostgreSQL Privilege Escalation Vulnerability - CVE-2022-1552

postgresql Updated 02 Oct 2025

Summary

31/08/2022
N/A
Yes i
High
8.8

ALPINE-CVE-2022-1552: A flaw was found in PostgreSQL. Affects postgresql versions < 13.7-r0. Fixed in 13.7-r0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

PostgreSQL is a powerful, open-source relational database system that uses and extends the SQL language. It is known for its robustness, extensibility, and support for advanced data types. However, it is susceptible to vulnerabilities that can compromise its security. CVE-2022-1552 is a significant vulnerability that affects multiple versions of PostgreSQL, allowing attackers to execute arbitrary SQL functions with superuser privileges under certain conditions.

Vulnerability Detail

CVE-2022-1552 is a flaw in PostgreSQL that arises from incomplete safety measures when a privileged user manages another user's objects. Specifically, commands such as Autovacuum, REINDEX, CREATE INDEX, REFRESH MATERIALIZED VIEW, CLUSTER, and pg_amcheck fail to activate necessary protections in a timely manner. This oversight permits an attacker, who has permission to create non-temporary objects in at least one schema, to execute arbitrary SQL functions as a superuser, potentially leading to unauthorized access and manipulation of sensitive data.

How To Fix

Minimum fixed version

13.7-r0

This is the first release that contains the fix.

sudo apk add --upgrade postgresql

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, restrict permissions for users who can create non-temporary objects in schemas until the package is updated. This can be done by reviewing and adjusting user roles and privileges in PostgreSQL.

Conclusion

CVE-2022-1552 is a critical vulnerability in PostgreSQL that can lead to privilege escalation. It is crucial for users to update their PostgreSQL installations to the patched versions to safeguard against potential exploitation. Additionally, implementing temporary workarounds can help mitigate risks until updates are applied.

See every vulnerability recorded for postgresql →

Share this vulnerability

FAQ

CVE-2022-1552 is a vulnerability in PostgreSQL that allows an attacker to execute arbitrary SQL functions with superuser privileges due to incomplete safety measures.

The vulnerability affects multiple versions of PostgreSQL, specifically those in Alpine v3.13, v3.14, v3.15, v3.16, v3.17, v3.18, v3.19, and v3.20.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The CVSS score for CVE-2022-1552 is 8.8, indicating a high severity level.

If immediate updates are not possible, consider restricting user permissions to mitigate the risk until the patch can be applied.

Related vulnerabilities

Recent vulnerabilities recorded for postgresql.

How To Fix

Minimum fixed version

13.7-r0

This is the first release that contains the fix.

sudo apk add --upgrade postgresql

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback