Time-of-Check Time-of-Use (TOCTOU) Race Condition Affecting postgresql package, versions [,12.20)[13.0,13.16)[14.0,14.13)[15.0,15.8)[16.0,16.4)


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.05% (22nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-UNMANAGED-POSTGRESQL-7660065
  • published9 Aug 2024
  • disclosed8 Aug 2024
  • creditNoah Misch

Introduced: 8 Aug 2024

CVE-2024-7348  (opens in a new tab)
CWE-367  (opens in a new tab)

How to fix?

Upgrade postgresql to version 12.20, 13.16, 14.13, 15.8, 16.4 or higher.

Overview

Affected versions of this package are vulnerable to Time-of-Check Time-of-Use (TOCTOU) Race Condition in the pg_dump command. A user can execute arbitrary SQL by replacing another relation type with a view or foreign table. While the victim needs to run pg_dump to be vulnerable, the attacker can exploit the race condition reliably by leaving a transaction open.

CVSS Scores

version 4.0
version 3.1