Read the docs
TI-2024-06809 Aliases CVE-2024-7348GHSA-3c6g-7v4g-5xcm

PostgreSQL relation replacement during pg_dump executes arbitrary SQL

Priority MEDIUM 43CWE-367Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
None
Attack complexity
Low
Impact type
—
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and Red Hat.

Summary

Time-of-check Time-of-use (TOCTOU) race condition in pg_dump in PostgreSQL allows an object creator to execute arbitrary SQL functions as the user running pg_dump, which is often a superuser. The attack involves replacing another relation type with a view or foreign table. The attack requires waiting for pg_dump to start, but winning the race condition is trivial if the attacker retains an open transaction. Versions before PostgreSQL 16.4, 15.8, 14.13, 13.16, and 12.20 are affected.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.01565 75th percentileScored 2026-11-07
Fix Fixed PostgreSQL: 16.4, 15.8, 14.13 +2Red Hat: 19 advisories

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
—PostgreSQL16 to before 16.4; 15 to before 15.8; 14 to before 14.13; 13 to before 13.16; before 12.2016.4, 15.8, 14.13, 13.16, 12.20Patch availableCNA
  • PostgreSQL Vendor— Affected 16 to before 16.4; 15 to before 15.8; 14 to before 14.13; 13 to before 13.16; before 12.20 Fixed in 16.4, 15.8, 14.13, 13.16, 12.20 Patch available CNA

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*12.0 to before 12.20; 13.0 to before 13.16; 14.0 to before 14.13; 15.0 to before 15.8; 16.0 to before 16.4VulnerablePostgreSQL
  • cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:* Versions 12.0 to before 12.20; 13.0 to before 13.16; 14.0 to before 14.13; 15.0 to before 15.8; 16.0 to before 16.4 Vulnerable ·PostgreSQL

Remediation

  • Fix · CNA PostgreSQL Fixed in 16.4, 15.8, 14.13, 13.16, 12.20

Red Hat 19 advisories

  • RHSA-2024:8495 Released 2024-10-28 · Red Hat rating Important
    postgresql security update
    • Red Hat Enterprise Linux Server (v. 7 ELS) postgresql-9.2.24-9.el7_9.1, postgresql-9.2.24-9.el7_9.1.ppc, postgresql-contrib-9.2.24-9.el7_9.1 +10
    • Red Hat Enterprise Linux Server Optional (v. 7 ELS) postgresql-static-9.2.24-9.el7_9.1, postgresql-static-9.2.24-9.el7_9.1.ppc, postgresql-upgrade-9.2.24-9.el7_9.1
  • RHSA-2024:6559 Released 2024-09-10 · Red Hat rating Important
    postgresql:12 security update
    • Red Hat Enterprise Linux AppStream AUS (v.8.6) pg_repack-1.4.6-3.module+el8.5.0+11354+78b3c9c5.src::postgresql:12, pg_repack-1.4.6-3.module+el8.5.0+11354+78b3c9c5.x86_64::postgresql:12, pgaudit-1.4.0-5.module+el8.5.0+11354+78b3c9c5.src::postgresql:12 +17
    • Red Hat Enterprise Linux AppStream E4S (v.8.6) pg_repack-1.4.6-3.module+el8.5.0+11354+78b3c9c5.aarch64::postgresql:12, pg_repack-1.4.6-3.module+el8.5.0+11354+78b3c9c5.ppc64le::postgresql:12, pg_repack-1.4.6-3.module+el8.5.0+11354+78b3c9c5.s390x::postgresql:12 +47
    • Red Hat Enterprise Linux AppStream TUS (v.8.6) pg_repack-1.4.6-3.module+el8.5.0+11354+78b3c9c5.src::postgresql:12, pg_repack-1.4.6-3.module+el8.5.0+11354+78b3c9c5.x86_64::postgresql:12, pgaudit-1.4.0-5.module+el8.5.0+11354+78b3c9c5.src::postgresql:12 +17
  • RHSA-2024:6558 Released 2024-09-10 · Red Hat rating Important
    postgresql:13 security update
    • Red Hat Enterprise Linux AppStream AUS (v.8.6) pg_repack-1.4.6-3.module+el8.5.0+11357+bcc62552.src::postgresql:13, pg_repack-1.4.6-3.module+el8.5.0+11357+bcc62552.x86_64::postgresql:13, pgaudit-1.5.0-1.module+el8.4.0+8873+b821c30a.src::postgresql:13 +17
    • Red Hat Enterprise Linux AppStream E4S (v.8.6) pg_repack-1.4.6-3.module+el8.5.0+11357+bcc62552.aarch64::postgresql:13, pg_repack-1.4.6-3.module+el8.5.0+11357+bcc62552.ppc64le::postgresql:13, pg_repack-1.4.6-3.module+el8.5.0+11357+bcc62552.s390x::postgresql:13 +47
    • Red Hat Enterprise Linux AppStream TUS (v.8.6) pg_repack-1.4.6-3.module+el8.5.0+11357+bcc62552.src::postgresql:13, pg_repack-1.4.6-3.module+el8.5.0+11357+bcc62552.x86_64::postgresql:13, pgaudit-1.5.0-1.module+el8.4.0+8873+b821c30a.src::postgresql:13 +17
Show 16 more Red Hat advisories
  • RHSA-2024:6557 Released 2024-09-10 · Red Hat rating Important
    postgresql:13 security update
    • Red Hat Enterprise Linux AppStream AUS (v.8.4) pgaudit-1.5.0-1.module+el8.4.0+8873+b821c30a.src::postgresql:13, pgaudit-1.5.0-1.module+el8.4.0+8873+b821c30a.x86_64::postgresql:13, postgres-decoderbufs-0.10.0-2.module+el8.4.0+8873+b821c30a.src::postgresql:13 +15
    • Red Hat Enterprise Linux AppStream E4S (v.8.4) pgaudit-1.5.0-1.module+el8.4.0+8873+b821c30a.ppc64le::postgresql:13, pgaudit-1.5.0-1.module+el8.4.0+8873+b821c30a.src::postgresql:13, pgaudit-1.5.0-1.module+el8.4.0+8873+b821c30a.x86_64::postgresql:13 +29
    • Red Hat Enterprise Linux AppStream TUS (v.8.4) pgaudit-1.5.0-1.module+el8.4.0+8873+b821c30a.src::postgresql:13, pgaudit-1.5.0-1.module+el8.4.0+8873+b821c30a.x86_64::postgresql:13, postgres-decoderbufs-0.10.0-2.module+el8.4.0+8873+b821c30a.src::postgresql:13 +15
  • RHSA-2024:6141 Released 2024-09-03 · Red Hat rating Important
    postgresql:13 security update
    • Red Hat Enterprise Linux AppStream EUS (v.8.8) pg_repack-1.4.6-3.module+el8.5.0+11357+bcc62552.aarch64::postgresql:13, pg_repack-1.4.6-3.module+el8.5.0+11357+bcc62552.ppc64le::postgresql:13, pg_repack-1.4.6-3.module+el8.5.0+11357+bcc62552.s390x::postgresql:13 +47
  • RHSA-2024:6142 Released 2024-09-03 · Red Hat rating Important
    postgresql:15 security update
    • Red Hat Enterprise Linux AppStream EUS (v.8.8) pg_repack-1.4.8-1.module+el8.8.0+17071+aaaceaa4.aarch64::postgresql:15, pg_repack-1.4.8-1.module+el8.8.0+17071+aaaceaa4.ppc64le::postgresql:15, pg_repack-1.4.8-1.module+el8.8.0+17071+aaaceaa4.s390x::postgresql:15 +47
  • RHSA-2024:6140 Released 2024-09-03 · Red Hat rating Important
    postgresql:15 security update
    • Red Hat Enterprise Linux AppStream EUS (v.9.2) pg_repack-1.4.8-1.module+el9.2.0+17405+aeb9ec60.aarch64::postgresql:15, pg_repack-1.4.8-1.module+el9.2.0+17405+aeb9ec60.ppc64le::postgresql:15, pg_repack-1.4.8-1.module+el9.2.0+17405+aeb9ec60.s390x::postgresql:15 +47
  • RHSA-2024:6137 Released 2024-09-03 · Red Hat rating Important
    postgresql:12 security update
    • Red Hat Enterprise Linux AppStream EUS (v.8.8) pg_repack-1.4.6-3.module+el8.5.0+11354+78b3c9c5.aarch64::postgresql:12, pg_repack-1.4.6-3.module+el8.5.0+11354+78b3c9c5.ppc64le::postgresql:12, pg_repack-1.4.6-3.module+el8.5.0+11354+78b3c9c5.s390x::postgresql:12 +47
  • RHSA-2024:6145 Released 2024-09-03 · Red Hat rating Important
    postgresql security update
    • Red Hat CodeReady Linux Builder EUS (v.9.2) postgresql-docs-13.16-1.el9_2, postgresql-private-devel-13.16-1.el9_2, postgresql-server-devel-13.16-1.el9_2 +3
    • Red Hat Enterprise Linux AppStream EUS (v.9.2) postgresql-13.16-1.el9_2, postgresql-contrib-13.16-1.el9_2, postgresql-plperl-13.16-1.el9_2 +5
  • RHSA-2024:6139 Released 2024-09-03 · Red Hat rating Important
    postgresql:12 security update
    • Red Hat Enterprise Linux AppStream AUS (v.8.4) pgaudit-1.4.0-6.module+el8.4.0+11288+c193d6d7.src::postgresql:12, pgaudit-1.4.0-6.module+el8.4.0+11288+c193d6d7.x86_64::postgresql:12, postgres-decoderbufs-0.10.0-2.module+el8.4.0+11288+c193d6d7.src::postgresql:12 +15
    • Red Hat Enterprise Linux AppStream E4S (v.8.4) pgaudit-1.4.0-6.module+el8.4.0+11288+c193d6d7.ppc64le::postgresql:12, pgaudit-1.4.0-6.module+el8.4.0+11288+c193d6d7.src::postgresql:12, pgaudit-1.4.0-6.module+el8.4.0+11288+c193d6d7.x86_64::postgresql:12 +29
    • Red Hat Enterprise Linux AppStream TUS (v.8.4) pgaudit-1.4.0-6.module+el8.4.0+11288+c193d6d7.src::postgresql:12, pgaudit-1.4.0-6.module+el8.4.0+11288+c193d6d7.x86_64::postgresql:12, postgres-decoderbufs-0.10.0-2.module+el8.4.0+11288+c193d6d7.src::postgresql:12 +15
  • RHSA-2024:6138 Released 2024-09-03 · Red Hat rating Important
    postgresql:12 security update
    • Red Hat Enterprise Linux AppStream AUS (v. 8.2) pgaudit-1.4.0-4.module+el8.2.0+9043+1dbb5661.src::postgresql:12, pgaudit-1.4.0-4.module+el8.2.0+9043+1dbb5661.x86_64::postgresql:12, postgres-decoderbufs-0.10.0-2.module+el8.2.0+9043+1dbb5661.src::postgresql:12 +15
  • RHSA-2024:6144 Released 2024-09-03 · Red Hat rating Important
    postgresql security update
    • Red Hat Enterprise Linux AppStream E4S (v.9.0) postgresql-13.16-1.el9_0, postgresql-contrib-13.16-1.el9_0, postgresql-plperl-13.16-1.el9_0 +5
  • RHSA-2024:6020 Released 2024-08-29 · Red Hat rating Important
    postgresql:15 security update
    • Red Hat Enterprise Linux AppStream (v. 9) pg_repack-1.4.8-1.module+el9.2.0+17405+aeb9ec60.aarch64::postgresql:15, pg_repack-1.4.8-1.module+el9.2.0+17405+aeb9ec60.ppc64le::postgresql:15, pg_repack-1.4.8-1.module+el9.2.0+17405+aeb9ec60.s390x::postgresql:15 +47
  • RHSA-2024:6018 Released 2024-08-29 · Red Hat rating Important
    postgresql:13 security update
    • Red Hat Enterprise Linux AppStream (v. 8) pg_repack-1.4.6-3.module+el8.9.0+20664+9c30cf7f.aarch64::postgresql:13, pg_repack-1.4.6-3.module+el8.9.0+20664+9c30cf7f.ppc64le::postgresql:13, pg_repack-1.4.6-3.module+el8.9.0+20664+9c30cf7f.s390x::postgresql:13 +47
  • RHSA-2024:6001 Released 2024-08-29 · Red Hat rating Important
    postgresql:15 security update
    • Red Hat Enterprise Linux AppStream (v. 8) pg_repack-1.4.8-1.module+el8.9.0+19797+c4ce5969.aarch64::postgresql:15, pg_repack-1.4.8-1.module+el8.9.0+19797+c4ce5969.ppc64le::postgresql:15, pg_repack-1.4.8-1.module+el8.9.0+19797+c4ce5969.s390x::postgresql:15 +47
  • RHSA-2024:6000 Released 2024-08-29 · Red Hat rating Important
    postgresql:12 security update
    • Red Hat Enterprise Linux AppStream (v. 8) pg_repack-1.4.6-3.module+el8.9.0+19330+c97ddbdf.aarch64::postgresql:12, pg_repack-1.4.6-3.module+el8.9.0+19330+c97ddbdf.ppc64le::postgresql:12, pg_repack-1.4.6-3.module+el8.9.0+19330+c97ddbdf.s390x::postgresql:12 +47
  • RHSA-2024:5999 Released 2024-08-29 · Red Hat rating Important
    postgresql security update
    • Red Hat Enterprise Linux AppStream (v. 9) postgresql-13.16-1.el9_4, postgresql-contrib-13.16-1.el9_4, postgresql-plperl-13.16-1.el9_4 +5
    • Red Hat Enterprise Linux CRB (v. 9) postgresql-docs-13.16-1.el9_4, postgresql-private-devel-13.16-1.el9_4, postgresql-server-devel-13.16-1.el9_4 +3
  • RHSA-2024:5927 Released 2024-08-28 · Red Hat rating Important
    postgresql:16 security update
    • Red Hat Enterprise Linux AppStream (v. 8) pg_repack-1.4.8-1.module+el8.10.0+20413+d8116364.aarch64::postgresql:16, pg_repack-1.4.8-1.module+el8.10.0+20413+d8116364.ppc64le::postgresql:16, pg_repack-1.4.8-1.module+el8.10.0+20413+d8116364.s390x::postgresql:16 +47
  • RHSA-2024:5929 Released 2024-08-28 · Red Hat rating Important
    postgresql:16 security update
    • Red Hat Enterprise Linux AppStream (v. 9) pg_repack-1.4.8-1.module+el9.4.0+20427+07482b8c.aarch64::postgresql:16, pg_repack-1.4.8-1.module+el9.4.0+20427+07482b8c.ppc64le::postgresql:16, pg_repack-1.4.8-1.module+el9.4.0+20427+07482b8c.s390x::postgresql:16 +47

Vendor assessments

Red Hat

Red Hat rating: Important. Red Hat's page for this CVE →

ProductStatusPlan or fix
Red Hat CodeReady Linux Builder EUS (v.9.2)Fixed RHSA-2024:6145
Red Hat Enterprise Linux AppStream (v. 8)Fixed RHSA-2024:5927, RHSA-2024:6000, RHSA-2024:6001, RHSA-2024:6018
Red Hat Enterprise Linux AppStream (v. 9)Fixed RHSA-2024:5929, RHSA-2024:5999, RHSA-2024:6020
Red Hat Enterprise Linux AppStream AUS (v. 8.2)Fixed RHSA-2024:6138
Red Hat Enterprise Linux AppStream AUS (v.8.4)Fixed RHSA-2024:6139, RHSA-2024:6557
Red Hat Enterprise Linux AppStream AUS (v.8.6)Fixed RHSA-2024:6558, RHSA-2024:6559
Red Hat Enterprise Linux AppStream E4S (v.8.4)Fixed RHSA-2024:6139, RHSA-2024:6557
Red Hat Enterprise Linux AppStream E4S (v.8.6)Fixed RHSA-2024:6558, RHSA-2024:6559
Red Hat Enterprise Linux AppStream E4S (v.9.0)Fixed RHSA-2024:6144
Red Hat Enterprise Linux AppStream EUS (v.8.8)Fixed RHSA-2024:6137, RHSA-2024:6141, RHSA-2024:6142
Red Hat Enterprise Linux AppStream EUS (v.9.2)Fixed RHSA-2024:6140, RHSA-2024:6145
Red Hat Enterprise Linux AppStream TUS (v.8.4)Fixed RHSA-2024:6139, RHSA-2024:6557
Red Hat Enterprise Linux AppStream TUS (v.8.6)Fixed RHSA-2024:6558, RHSA-2024:6559
Red Hat Enterprise Linux CRB (v. 9)Fixed RHSA-2024:5999
Red Hat Enterprise Linux Server (v. 7 ELS)Fixed RHSA-2024:8495
Red Hat Enterprise Linux Server Optional (v. 7 ELS)Fixed RHSA-2024:8495
Not affected: 2 products
  • Red Hat Enterprise Linux 10
  • Red Hat Enterprise Linux 6

Timeline

  1. 2026-10-02 Threatist record created from CVE-2024-7348
  2. 2026-10-03 Alias added: GHSA-3c6g-7v4g-5xcm

References

  • TI-2019-06651 In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and… CVSS 3.0HIGH 7.2
  • TI-2017-05187 Improper authentication in postgresql CVSS 3.0CRITICAL 9.8
  • TI-2020-15711 SQL injection in postgresql CVSS 3.1HIGH 8.8
  • TI-2013-01675 Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9… CVSS 2.0MEDIUM 6.5
  • TI-2007-03176 The Database Link library (dblink) in PostgreSQL 8.1 implements functions via CREATE… CVSS 2.0HIGH 9.0
  • TI-2022-01423 SQL injection in postgresql CVSS 3.1HIGH 8.8
See all 202 →

Sources