Information Leak Vulnerability in PostgreSQL - CVE-2021-3393

postgresql Updated 02 Oct 2025

Summary

01/04/2021
N/A
Yes i
Medium
4.3

ALPINE-CVE-2021-3393: An information leak was discovered in postgresql in versions before 13.2, before 12.6 and before 11.11. Affects postgresql versions < 11.11-r0. Fixed in 11.11-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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

PostgreSQL is a powerful, open-source object-relational database system known for its robustness, extensibility, and standards compliance. It supports a wide variety of data types and offers advanced features such as transactions, subselects, triggers, views, and stored procedures. However, certain versions of PostgreSQL are vulnerable to an information leak that could allow unauthorized access to sensitive data.

Vulnerability Detail

An information leak was discovered in PostgreSQL versions prior to 13.2, 12.6, and 11.11. This vulnerability arises when a user has UPDATE permission but lacks SELECT permission on a specific column. Under certain conditions, crafted queries could inadvertently disclose values from that column in error messages. An attacker could exploit this flaw to gain access to information stored in a column they are permitted to write to but not read from, potentially leading to unauthorized data exposure.

How To Fix

Minimum fixed version

11.11-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, consider restricting UPDATE permissions for users who do not have SELECT permissions on sensitive columns. This can be done by adjusting the role privileges in PostgreSQL using the following SQL command:

REVOKE UPDATE ON table_name FROM user_name;

Conclusion

CVE-2021-3393 represents a significant information leak vulnerability in PostgreSQL that could lead to unauthorized data exposure. It is crucial for users to update their PostgreSQL installations to the latest patched versions to mitigate this risk. Additionally, implementing proper permission controls can help prevent exploitation of this vulnerability.

See every vulnerability recorded for postgresql →

Share this vulnerability

FAQ

CVE-2021-3393 is a vulnerability in PostgreSQL that allows information leakage from columns where a user has UPDATE permission but not SELECT permission.

Versions prior to 13.2, 12.6, and 11.11 are affected by this vulnerability.

An attacker could exploit this vulnerability to access sensitive information from columns they should not be able to read.

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-2021-3393 is 4.3, indicating a moderate severity level.

Related vulnerabilities

Recent vulnerabilities recorded for postgresql.

How To Fix

Minimum fixed version

11.11-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