CVE-2026-6474·PostgreSQL vulnerability
Externally-controlled format string in PostgreSQL timeofday() function allows an attacker to retrieve portions of server memory, via crafted timezone zones. Versions before PostgreSQL 18.4, 17.10, 16.14, 15.18, and 14.23 are affected.
- Severity
- medium
- Software
- PostgreSQL
- Fixed in
- 18.4
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at 0.31% — higher than 22% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Affected versions
From: 18.0
Until: 18.4
Fixed in: 18.4
How to fix this CVE
Upgrade PostgreSQL to version 18.4 or later to patch a format string vulnerability in the timeofday() function that could leak sensitive server memory. This vulnerability requires authenticated database access to exploit, so immediate patching is recommended for systems with untrusted database users.
sudo dnf update postgresql-server postgresql-contrib postgresql-libsDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check your PostgreSQL version by running `psql --version` or connecting to the database and executing `SELECT version();`
- Step 2: Identify users with database connection privileges by querying `SELECT usename, usecanlogin FROM pg_user;` to understand your attack surface
- Step 3: Search PostgreSQL logs (typically in /var/log/postgresql/) for calls to the timeofday() function combined with unusual timezone parameters using `grep -i 'timeofday' /var/log/postgresql/*.log`
- Step 4: After upgrading, verify the new version with `psql --version` and confirm the fix by checking that FORMAT strings in timezone handling no longer trigger memory disclosure
FAQ
What is CVE-2026-6474?
This is a format string vulnerability in PostgreSQL's timeofday() function that allows authenticated users to read portions of server memory by supplying malicious timezone parameters. The flaw stems from improper handling of user-controlled data in format string operations.
Is CVE-2026-6474 being actively exploited?
No, this vulnerability is not currently listed in CISA's Known Exploited Vulnerabilities (KEV) catalog and no public exploits are available. However, the low barrier to exploitation (requiring only database authentication) means patching should not be delayed.
What versions of PostgreSQL are affected by CVE-2026-6474?
PostgreSQL versions 18.0 through 18.3 are vulnerable. Earlier major version branches (17.x before 17.10, 16.x before 16.14, 15.x before 15.18, and 14.x before 14.23) also contain this flaw in their respective release lines.
How do I check if my server is vulnerable to CVE-2026-6474?
Connect to your PostgreSQL instance and run `SELECT version();` to check the version number. If it matches 18.0–18.3 or the affected releases in earlier branches, your system is vulnerable and requires immediate patching.
Does Defensia detect CVE-2026-6474?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If PostgreSQL is installed on a monitored server, CVE-2026-6474 will appear in your dashboard with remediation steps.
Related PostgreSQL CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-6474. Free for 1 server.
Get started free