CVE-2021-3677
A flaw was found in postgresql. A purpose-crafted query can read arbitrary bytes of server memory. In the default configuration, any authenticated database user can complete this attack at will. The attack does not require the ability to create objects. If server settings include max_worker_processes=0, the known versions of this attack are infeasible. However, undiscovered variants of the attack may be independent of that setting.
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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 20.04 | postgresql-12 | Fixed | 12.8-0ubuntu0.20.04.1 | UBUNTU-CVE-2021-3677 |
| Ubuntu 16.04 | postgresql-9.5 | Not affected vulnerable_code_not_present | ||
| Ubuntu 14.04 | postgresql-9.1 | Fix pending | ||
| Red Hat Enterprise Linux 9 | postgresql | Not affected | ||
| Red Hat Enterprise Linux 9 | postgresql-contrib | Not affected | ||
| Red Hat Enterprise Linux 9 | postgresql-docs | Not affected | ||
| Red Hat Enterprise Linux 9 | postgresql-plperl | Not affected | ||
| Red Hat Enterprise Linux 9 | postgresql-plpython3 | Not affected | ||
| Red Hat Enterprise Linux 9 | postgresql-pltcl | Not affected | ||
| Red Hat Enterprise Linux 9 | postgresql-private-devel | Not affected | ||
| Red Hat Enterprise Linux 9 | postgresql-private-libs | Not affected | ||
| Red Hat Enterprise Linux 9 | postgresql-server | Not affected | ||
| Red Hat Enterprise Linux 9 | postgresql-server-devel | Not affected | ||
| Red Hat Enterprise Linux 9 | postgresql-static | Not affected | ||
| Red Hat Enterprise Linux 9 | postgresql-test | Not affected | ||
| Red Hat Enterprise Linux 9 | postgresql-test-rpm-macros | Not affected | ||
| Red Hat Enterprise Linux 9 | postgresql-upgrade | Not affected | ||
| Red Hat Enterprise Linux 9 | postgresql-upgrade-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | libpq | Not affected | ||
| Red Hat Enterprise Linux 8 | libpq-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | pg_repack | Fixed | 0:1.4.6-3.module+el8.5.0+11357+bcc62552 | RHSA-2021:5235 |
| Red Hat Enterprise Linux 8 | pgaudit | Fixed | 0:1.4.0-5.module+el8.5.0+11354+78b3c9c5 | RHSA-2021:5236 |
| Red Hat Enterprise Linux 8 | postgres-decoderbufs | Fixed | 0:0.10.0-2.module+el8.4.0+8873+b821c30a | RHSA-2021:5235 |
| Red Hat Enterprise Linux 8 | postgresql | Fixed | 0:13.5-1.module+el8.5.0+13344+8c0fd184 | RHSA-2021:5235 |
| Red Hat Enterprise Linux 8 | postgresql-contrib | Fixed | 0:12.9-1.module+el8.5.0+13373+4554acc4 | RHSA-2021:5236 |
| Red Hat Enterprise Linux 8 | postgresql-docs | Fixed | 0:13.5-1.module+el8.5.0+13344+8c0fd184 | RHSA-2021:5235 |
| Red Hat Enterprise Linux 8 | postgresql-plperl | Fixed | 0:13.5-1.module+el8.5.0+13344+8c0fd184 | RHSA-2021:5235 |
| Red Hat Enterprise Linux 8 | postgresql-plpython3 | Fixed | 0:12.9-1.module+el8.5.0+13373+4554acc4 | RHSA-2021:5236 |
| Red Hat Enterprise Linux 8 | postgresql-pltcl | Fixed | 0:13.5-1.module+el8.5.0+13344+8c0fd184 | RHSA-2021:5235 |
| Red Hat Enterprise Linux 8 | postgresql-private-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | postgresql-private-libs | Not affected | ||
| Red Hat Enterprise Linux 8 | postgresql-server | Fixed | 0:12.9-1.module+el8.5.0+13373+4554acc4 | RHSA-2021:5236 |
| Red Hat Enterprise Linux 8 | postgresql-server-devel | Fixed | 0:13.5-1.module+el8.5.0+13344+8c0fd184 | RHSA-2021:5235 |
| Red Hat Enterprise Linux 8 | postgresql-static | Fixed | 0:12.9-1.module+el8.5.0+13373+4554acc4 | RHSA-2021:5236 |
| Red Hat Enterprise Linux 8 | postgresql-test | Fixed | 0:12.9-1.module+el8.5.0+13373+4554acc4 | RHSA-2021:5236 |
| Red Hat Enterprise Linux 8 | postgresql-test-rpm-macros | Fixed | 0:12.9-1.module+el8.5.0+13373+4554acc4 | RHSA-2021:5236 |
| Red Hat Enterprise Linux 8 | postgresql-upgrade | Fixed | 0:12.9-1.module+el8.5.0+13373+4554acc4 | RHSA-2021:5236 |
| Red Hat Enterprise Linux 8 | postgresql-upgrade-devel | Fixed | 0:13.5-1.module+el8.5.0+13344+8c0fd184 | RHSA-2021:5235 |
| Red Hat Enterprise Linux 7 | postgresql | Not affected | ||
| Red Hat Enterprise Linux 7 | postgresql-contrib | Not affected | ||
| Red Hat Enterprise Linux 7 | postgresql-devel | Not affected | ||
| Red Hat Enterprise Linux 7 | postgresql-docs | Not affected | ||
| Red Hat Enterprise Linux 7 | postgresql-libs | Not affected | ||
| Red Hat Enterprise Linux 7 | postgresql-plperl | Not affected | ||
| Red Hat Enterprise Linux 7 | postgresql-plpython | Not affected | ||
| Red Hat Enterprise Linux 7 | postgresql-pltcl | Not affected | ||
| Red Hat Enterprise Linux 7 | postgresql-server | Not affected | ||
| Red Hat Enterprise Linux 7 | postgresql-static | Not affected | ||
| Red Hat Enterprise Linux 7 | postgresql-test | Not affected | ||
| Red Hat Enterprise Linux 7 | postgresql-upgrade | Not affected | ||
| Red Hat Enterprise Linux 5 | postgresql | Not affected | ||
| AlmaLinux 8 | pg_repack | Fixed | 1.4.6-3.module_el8.6.0+2760+1746ec94 | ALSA-2021:5236 |
| AlmaLinux 8 | pgaudit | Fixed | 1.4.0-5.module_el8.6.0+2758+4f4474df | ALSA-2021:5235 |
| AlmaLinux 8 | postgres-decoderbufs | Fixed | 0.10.0-2.module_el8.6.0+2758+4f4474df | ALSA-2021:5235 |
| AlmaLinux 8 | postgresql | Fixed | 12.9-1.module_el8.5.0+2606+4554acc4 | ALSA-2021:5236 |
| AlmaLinux 8 | postgresql-contrib | Fixed | 12.9-1.module_el8.5.0+2606+4554acc4 | ALSA-2021:5236 |
| AlmaLinux 8 | postgresql-docs | Fixed | 12.9-1.module_el8.5.0+2606+4554acc4 | ALSA-2021:5236 |
| AlmaLinux 8 | postgresql-plperl | Fixed | 13.5-1.module_el8.5.0+2607+8c0fd184 | ALSA-2021:5235 |
| AlmaLinux 8 | postgresql-plpython3 | Fixed | 12.9-1.module_el8.5.0+2606+4554acc4 | ALSA-2021:5236 |
| AlmaLinux 8 | postgresql-pltcl | Fixed | 13.5-1.module_el8.5.0+2607+8c0fd184 | ALSA-2021:5235 |
| AlmaLinux 8 | postgresql-server | Fixed | 13.5-1.module_el8.5.0+2607+8c0fd184 | ALSA-2021:5235 |
| AlmaLinux 8 | postgresql-server-devel | Fixed | 13.5-1.module_el8.5.0+2607+8c0fd184 | ALSA-2021:5235 |
| AlmaLinux 8 | postgresql-static | Fixed | 13.5-1.module_el8.5.0+2607+8c0fd184 | ALSA-2021:5235 |
| AlmaLinux 8 | postgresql-test | Fixed | 13.5-1.module_el8.5.0+2607+8c0fd184 | ALSA-2021:5235 |
| AlmaLinux 8 | postgresql-test-rpm-macros | Fixed | 13.5-1.module_el8.5.0+2607+8c0fd184 | ALSA-2021:5235 |
| AlmaLinux 8 | postgresql-upgrade | Fixed | 12.9-1.module_el8.5.0+2606+4554acc4 | ALSA-2021:5236 |
| AlmaLinux 8 | postgresql-upgrade-devel | Fixed | 13.5-1.module_el8.5.0+2607+8c0fd184 | ALSA-2021:5235 |
| Rocky Linux 8 | pg_repack | Fixed | 0:1.4.6-3.module+el8.5.0+684+c3892ef9 | RLSA-2021:5235 |
| Rocky Linux 8 | pgaudit | Fixed | 0:1.5.0-1.module+el8.5.0+684+c3892ef9 | RLSA-2021:5235 |
| Rocky Linux 8 | postgres-decoderbufs | Fixed | 0:0.10.0-2.module+el8.5.0+684+c3892ef9 | RLSA-2021:5236 |
| Rocky Linux 8 | postgresql | Fixed | 0:12.9-1.module+el8.5.0+724+9de6e501 | RLSA-2021:5236 |
| Alpine Linux 3.20 | postgresql14 | Fixed | 13.4-r0 | ALPINE-CVE-2021-3677 |
| Alpine Linux 3.20 | postgresql15 | Fixed | 13.4-r0 | ALPINE-CVE-2021-3677 |
| Alpine Linux 3.19 | postgresql13 | Fixed | 13.4-r0 | ALPINE-CVE-2021-3677 |
| Alpine Linux 3.19 | postgresql14 | Fixed | 13.4-r0 | ALPINE-CVE-2021-3677 |
| Alpine Linux 3.19 | postgresql15 | Fixed | 13.4-r0 | ALPINE-CVE-2021-3677 |
| Alpine Linux 3.18 | postgresql12 | Fixed | 12.8-r0 | ALPINE-CVE-2021-3677 |
| Alpine Linux 3.18 | postgresql13 | Fixed | 13.4-r0 | ALPINE-CVE-2021-3677 |
| Alpine Linux 3.18 | postgresql14 | Fixed | 13.4-r0 | ALPINE-CVE-2021-3677 |
| Alpine Linux 3.18 | postgresql15 | Fixed | 13.4-r0 | ALPINE-CVE-2021-3677 |
| Alpine Linux 3.17 | postgresql12 | Fixed | 12.8-r0 | ALPINE-CVE-2021-3677 |
| Alpine Linux 3.17 | postgresql13 | Fixed | 13.4-r0 | ALPINE-CVE-2021-3677 |
| Alpine Linux 3.17 | postgresql14 | Fixed | 13.4-r0 | ALPINE-CVE-2021-3677 |
| Alpine Linux 3.17 | postgresql15 | Fixed | 13.4-r0 | ALPINE-CVE-2021-3677 |
| Alpine Linux 3.16 | postgresql12 | Fixed | 12.8-r0 | ALPINE-CVE-2021-3677 |
| Alpine Linux 3.16 | postgresql13 | Fixed | 13.4-r0 | ALPINE-CVE-2021-3677 |
| Alpine Linux 3.16 | postgresql14 | Fixed | 13.4-r0 | ALPINE-CVE-2021-3677 |
| Alpine Linux 3.15 | postgresql12 | Fixed | 12.8-r0 | ALPINE-CVE-2021-3677 |
| Alpine Linux 3.15 | postgresql13 | Fixed | 13.4-r0 | ALPINE-CVE-2021-3677 |
| Alpine Linux 3.15 | postgresql14 | Fixed | 13.4-r0 | ALPINE-CVE-2021-3677 |
| Alpine Linux 3.14 | postgresql | Fixed | 13.4-r0 | ALPINE-CVE-2021-3677 |
| Alpine Linux 3.13 | postgresql | Fixed | 13.4-r0 | ALPINE-CVE-2021-3677 |
| Alpine Linux 3.12 | postgresql | Fixed | 12.8-r0 | ALPINE-CVE-2021-3677 |
| Alpine Linux 3.11 | postgresql | Fixed | 12.8-r0 | ALPINE-CVE-2021-3677 |
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.
- postgresql: affected: Fixedin v13.4, v12.8, v11.13
Vendor advisories:
- https://security.gentoo.org/glsa/202211-04 (vendor-advisory)
References
- https://www.postgresql.org/support/security/CVE-2021-3677/
- https://bugzilla.redhat.com/show_bug.cgi?id=2001857
- https://security.netapp.com/advisory/ntap-20220407-0008/
- https://security.gentoo.org/glsa/202211-04
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.