CVE-2021-20229
Incorrect Authorization in PostgreSQL
A flaw was found in PostgreSQL in versions before 13.2. This flaw allows a user with SELECT privilege on one column to craft a special query that returns all columns of the table. The highest threat from this vulnerability is to confidentiality.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
NVD Score used
4.3
A flaw was found in PostgreSQL in versions before 13.2. This flaw allows a user with SELECT privilege on one column to craft a special query that returns all columns of the table. The highest threat from this vulnerability is to confidentiality.
- Record
CVE-2021-20229- CVSS 3.1
- 4.3 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N - CVSS 2.0
- 4.0 Medium
AV:N/AC:L/Au:S/C:P/I:N/A:N - Weakness
- CWE-863
- Updated
- 2026-11-02
CVE List No score
A flaw was found in PostgreSQL in versions before 13.2. This flaw allows a user with SELECT privilege on one column to craft a special query that returns all columns of the table. The highest threat from this vulnerability is to confidentiality.
- Record
CVE-2021-20229- Weakness
- CWE-863
- Updated
- 2026-11-02
EUVDEUVD-2021-7668 No score
A flaw was found in PostgreSQL in versions before 13.2. This flaw allows a user with SELECT privilege on one column to craft a special query that returns all columns of the table. The highest threat from this vulnerability is to confidentiality.
- Record
EUVD-2021-7668- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-43rr-wcj9-h45w
4.3
Incorrect Authorization in PostgreSQL
A flaw was found in PostgreSQL in versions before 13.2, before 12.6, before 11.11, before 10.16, before 9.6.21 and before 9.5.25. This flaw allows a user with SELECT privilege on one column to craft a special query that returns all columns of the table. The highest threat from this vulnerability is to confidentiality.
- Record
GHSA-43rr-wcj9-h45w- CVSS 3.1
- 4.3 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-863
- Updated
- 2026-11-02
OSVALPINE-CVE-2021-20229
4.3
A flaw was found in PostgreSQL in versions before 13.2. This flaw allows a user with SELECT privilege on one column to craft a special query that returns all columns of the table. The highest threat from this vulnerability is to confidentiality.
- Record
ALPINE-CVE-2021-20229- CVSS 3.1
- 4.3 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N - Updated
- 2026-11-03
OSVBELL-CVE-2021-20229
4.3
CVE-2021-20229 does not affect BellSoft software
- Record
BELL-CVE-2021-20229- CVSS 3.1
- 4.3 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N - Updated
- 2026-11-02
Show 12 moreShow less
OSV
4.3
A flaw was found in PostgreSQL in versions before 13.2. This flaw allows a user with SELECT privilege on one column to craft a special query that returns all columns of the table. The highest threat from this vulnerability is to confidentiality.
- Record
CVE-2021-20229- CVSS 3.1
- 4.3 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N - Updated
- 2026-11-02
OSVDEBIAN-CVE-2021-20229
4.3
A flaw was found in PostgreSQL in versions before 13.2. This flaw allows a user with SELECT privilege on one column to craft a special query that returns all columns of the table. The highest threat from this vulnerability is to confidentiality.
- Record
DEBIAN-CVE-2021-20229- CVSS 3.1
- 4.3 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N - Updated
- 2026-11-02
OSVOESA-2021-1124
4.3
postgresql security update
PostgreSQL is an advanced Object-Relational database management system (DBMS) that supports almost all SQL constructs (including transactions, subselects and user-defined types and functions). The postgresql package includes the client programs and libraries that you'll need to access a PostgreSQL DBMS server.
Security Fix(es):
A flaw was found in PostgreSQL in versions before 13.2, before 12.6, before 11.11, before 10.16, before 9.6.21 and before 9.5.25. This flaw allows a user with SELECT privilege on one column to craft a special query that returns all columns of the table. The highest threat from this vulnerability is to confidentiality.(CVE-2021-20229)
- Record
OESA-2021-1124- CVSS 3.1
- 4.3 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N - Updated
- 2026-11-02
OSVBIT-postgresql-2021-20229 No score
A flaw was found in PostgreSQL in versions before 13.2. This flaw allows a user with SELECT privilege on one column to craft a special query that returns all columns of the table. The highest threat from this vulnerability is to confidentiality.
- Record
BIT-postgresql-2021-20229- Updated
- 2026-11-02
OSVMGASA-2021-0121 No score
Updated postgresql packages fix security vulnerabilities
A user having an UPDATE privilege on a partitioned table but lacking the SELECT privilege on some column may be able to acquire denied-column values from an error message (CVE-2021-3393).
A user having a SELECT privilege on an individual column can craft a special query that returns all columns of the table. Additionally, a stored view that uses column-level privileges will have incomplete column-usage bitmaps. In installations that depend on column-level permissions for security, it is recommended to execute CREATE OR REPLACE on all user-defined views to force them to be re-parsed (CVE-2021-20229).
PostgreSQL 11 was only affected by CVE-2021-3393 and both PostgreSQL 11 and 13 were affected by CVE-2021-20229. PostgreSQL 9.6 was updated to fix bugs.
- Record
MGASA-2021-0121- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:11187-1 No score
libecpg6-13.4-1.3 on GA media
These are all security issues fixed in the libecpg6-13.4-1.3 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:11187-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:12387-1 No score
postgresql14-14.5-2.1 on GA media
These are all security issues fixed in the postgresql14-14.5-2.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:12387-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:13243-1 No score
postgresql15-15.4-2.1 on GA media
These are all security issues fixed in the postgresql15-15.4-2.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:13243-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:14360-1 No score
postgresql16-16.4-1.1 on GA media
These are all security issues fixed in the postgresql16-16.4-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:14360-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2025:15580-1 No score
postgresql17-17.6-2.1 on GA media
These are all security issues fixed in the postgresql17-17.6-2.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2025:15580-1- Updated
- 2026-11-02
OSVSUSE-SU-2021:0543-1 No score
Security update for postgresql13
This update for postgresql13 fixes the following issues:
Upgrade to version 13.2:
- Updating stored views and reindexing might be needed after applying this update.
- CVE-2021-3393, bsc#1182040: Fix information leakage in constraint-violation error messages.
- CVE-2021-20229, bsc#1182039: Fix failure to check per-column SELECT privileges in some join queries.
- Record
SUSE-SU-2021:0543-1- Updated
- 2026-11-02
OSVSUSE-SU-2021:0545-1 No score
Security update for postgresql13
This update for postgresql13 fixes the following issues:
Upgrade to version 13.2:
- Updating stored views and reindexing might be needed after applying this update.
- CVE-2021-3393, bsc#1182040: Fix information leakage in constraint-violation error messages.
- CVE-2021-20229, bsc#1182039: Fix failure to check per-column SELECT privileges in some join queries.
- Record
SUSE-SU-2021:0545-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
postgresqlAlpine:v3.12 |
13.0 up to 12.6-r0 | 12.6-r0 |
postgresqlAlpine:v3.13 |
13.0 up to 13.2-r0 | 13.2-r0 |
postgresqlAlpine:v3.14 |
13.0 up to 13.2-r0 | 13.2-r0 |
postgresql13Alpine:v3.15 |
before 13.2-r0 | 13.2-r0 |
postgresql13Alpine:v3.16 |
before 13.2-r0 | 13.2-r0 |
postgresql13Alpine:v3.17 |
before 13.2-r0 | 13.2-r0 |
postgresql13Alpine:v3.18 |
before 13.2-r0 | 13.2-r0 |
postgresql13Alpine:v3.19 |
before 13.2-r0 | 13.2-r0 |
postgresql14Alpine:v3.15 |
before 13.2-r0 | 13.2-r0 |
postgresql14Alpine:v3.16 |
before 13.2-r0 | 13.2-r0 |
Show 27 moreShow less
| Package | Affected | Fixed |
|---|---|---|
postgresql14Alpine:v3.17 |
before 13.2-r0 | 13.2-r0 |
postgresql14Alpine:v3.18 |
before 13.2-r0 | 13.2-r0 |
postgresql14Alpine:v3.19 |
before 13.2-r0 | 13.2-r0 |
postgresql14Alpine:v3.20 |
before 13.2-r0 | 13.2-r0 |
postgresql15Alpine:v3.17 |
before 13.2-r0 | 13.2-r0 |
postgresql15Alpine:v3.18 |
before 13.2-r0 | 13.2-r0 |
postgresql15Alpine:v3.19 |
before 13.2-r0 | 13.2-r0 |
postgresql15Alpine:v3.20 |
before 13.2-r0 | 13.2-r0 |
postgresqlBitnami |
13.0.0 up to 13.2.0 | 13.2.0 |
postgresql-13Debian:11 |
before 13.2-1 | 13.2-1 |
postgresql9.6Mageia:7 From an advisory covering 2 CVEs |
before 9.6.21-1.mga7 | 9.6.21-1.mga7 |
postgresql11Mageia:7 From an advisory covering 2 CVEs |
before 11.11-1.mga7 | 11.11-1.mga7 |
postgresql11Mageia:8 From an advisory covering 2 CVEs |
before 11.11-1.mga8 | 11.11-1.mga8 |
postgresql13Mageia:8 From an advisory covering 2 CVEs |
before 13.2-1.mga8 | 13.2-1.mga8 |
postgresqlopenEuler:20.03-LTS |
before 10.5-21.oe1 | 10.5-21.oe1 |
postgresqlopenEuler:20.03-LTS-SP1 |
before 10.5-21.oe1 | 10.5-21.oe1 |
postgresql13SUSE:Linux Enterprise Module for Basesystem 15 SP2 From an advisory covering 2 CVEs |
before 13.2-5.6.1 | 13.2-5.6.1 |
postgresql13SUSE:Linux Enterprise Module for Package Hub 15 SP2 From an advisory covering 2 CVEs |
before 13.2-5.6.1 | 13.2-5.6.1 |
postgresql13SUSE:Linux Enterprise Module for Server Applications 15 SP2 From an advisory covering 2 CVEs |
before 13.2-5.6.1 | 13.2-5.6.1 |
postgresql13SUSE:Linux Enterprise Software Development Kit 12 SP5 From an advisory covering 2 CVEs |
before 13.2-3.6.1 | 13.2-3.6.1 |
postgresql13SUSE:Linux Enterprise Server 12 SP5 From an advisory covering 2 CVEs |
before 13.2-3.6.1 | 13.2-3.6.1 |
postgresql13SUSE:Linux Enterprise Server for SAP Applications 12 SP5 From an advisory covering 2 CVEs |
before 13.2-3.6.1 | 13.2-3.6.1 |
postgresql13openSUSE:Tumbleweed From an advisory covering 9 CVEs |
before 13.4-1.3 | 13.4-1.3 |
postgresql14openSUSE:Tumbleweed From an advisory covering 8 CVEs |
before 14.5-2.1 | 14.5-2.1 |
postgresql15openSUSE:Tumbleweed From an advisory covering 11 CVEs |
before 15.4-2.1 | 15.4-2.1 |
postgresql16openSUSE:Tumbleweed From an advisory covering 15 CVEs |
before 16.4-1.1 | 16.4-1.1 |
postgresql17openSUSE:Tumbleweed From an advisory covering 18 CVEs |
before 17.6-2.1 | 17.6-2.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| affected | OSV | |
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-20229 is a medium vulnerability (CVSS 4.3) in Postgresql, published February 22, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.47%, the 73rd percentile. Fixed in postgresql 12.6-r0.
References
bugzilla.redhat.com/show_bug.cgi?id=1925296
security.netapp.com/advisory/ntap-20210326-0005
security.gentoo.org/glsa/202105-32
nvd.nist.gov/vuln/detail/CVE-2021-20229
github.com/advisories/GHSA-43rr-wcj9-h45w
security.alpinelinux.org/vuln/CVE-2021-20229
Show 32 moreShow less
docs.bell-sw.com/security/cves/CVE-2021-20229
security-tracker.debian.org/tracker/CVE-2021-20229
advisories.mageia.org/MGASA-2021-0121.html
bugs.mageia.org/show_bug.cgi?id=28373
postgresql.org/about/news/postgresql-132-126-1111-1016-9621-and-9525-released-2165
openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2021-1124
suse.com/support/update/announcement/2021/suse-su-20210543-1
bugzilla.suse.com/1179765
bugzilla.suse.com/1182039
bugzilla.suse.com/1182040
suse.com/security/cve/CVE-2021-20229
suse.com/security/cve/CVE-2021-3393
suse.com/support/update/announcement/2021/suse-su-20210545-1
suse.com/security/cve/CVE-2020-25694
suse.com/security/cve/CVE-2020-25695
suse.com/security/cve/CVE-2020-25696
suse.com/security/cve/CVE-2021-32027
suse.com/security/cve/CVE-2021-32028
suse.com/security/cve/CVE-2021-32029
suse.com/security/cve/CVE-2021-3677
suse.com/security/cve/CVE-2021-23214
suse.com/security/cve/CVE-2021-23222
suse.com/security/cve/CVE-2022-1552
lists.opensuse.org/archives/list/[email protected]/thread/RSHH7GG3JERRES4WX7FTBWO2TZCAMJMP
suse.com/security/cve/CVE-2022-41862
suse.com/security/cve/CVE-2023-2454
suse.com/security/cve/CVE-2023-2455
suse.com/security/cve/CVE-2024-7348
suse.com/security/cve/CVE-2023-5868
suse.com/security/cve/CVE-2023-5869
suse.com/security/cve/CVE-2023-5870
suse.com/security/cve/CVE-2024-0985