CVE-2026-18024·PostgreSQL vulnerability
Buffer over-read in PostgreSQL ascii() SQL function allows a user to disclose up to 3 bytes after the end of a specific allocation, via a crafted text value. This is the same class of defect that CVE-2026-2006 fixed, though this instance has less impact. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.
- Severity
- medium
- Software
- PostgreSQL
- Fixed in
- 18.5
- 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.20% — higher than 8% 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.5
Fixed in: 18.5
How to fix this CVE
Update PostgreSQL to version 18.6 or later to address a buffer over-read vulnerability in the ascii() function that could allow authenticated users to leak small amounts of memory. Organizations running PostgreSQL 18.0–18.5 should prioritize this patch, particularly in environments where database access controls may be less restrictive. The vulnerability requires database authentication, limiting its overall risk profile but still warranting timely remediation.
sudo dnf update postgresql-server postgresql-contrib postgresql-libsDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check PostgreSQL version with: psql --version or SELECT version();
- Step 2: Query the system catalog to identify if the ascii() function is used in applications: SELECT routine_name FROM information_schema.routines WHERE routine_definition LIKE '%ascii%';
- Step 3: Search PostgreSQL logs for authentication attempts and ascii() function calls: grep -i 'ascii' /var/log/postgresql/postgresql.log
- Step 4: After patching, verify the new version with psql --version and confirm the update completed: SELECT version();
FAQ
What is CVE-2026-18024?
A buffer over-read flaw in PostgreSQL's ascii() function permits authenticated database users to read a small number of bytes beyond allocated memory boundaries, potentially exposing sensitive data stored in adjacent memory regions.
Is CVE-2026-18024 being actively exploited?
No. This vulnerability is not listed on the CISA Known Exploited Vulnerabilities (KEV) catalog, and no public exploits are currently available. However, it should still be patched as part of routine security maintenance.
What versions of PostgreSQL are affected by CVE-2026-18024?
PostgreSQL versions 18.0 through 18.5 are affected. Versions 18.6 and later, as well as the 17.11, 16.15, 15.19, and 14.24 patch releases for their respective branches, contain the fix.
How do I check if my server is vulnerable to CVE-2026-18024?
Run SELECT version(); in psql to identify your PostgreSQL version. If the output shows version 18.0–18.5, your installation is vulnerable and requires an immediate update to 18.6 or later.
Does Defensia detect CVE-2026-18024?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If PostgreSQL is installed on a monitored server, CVE-2026-18024 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-18024. Free for 1 server.
Get started free