medium CVSS 4.3 EPSS 0.20%

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-libs

Defensia detects this vulnerability

How to check if you are affected

  1. Step 1: Check PostgreSQL version with: psql --version or SELECT version();
  2. 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%';
  3. Step 3: Search PostgreSQL logs for authentication attempts and ascii() function calls: grep -i 'ascii' /var/log/postgresql/postgresql.log
  4. 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

CVE-2026-14671CVSS 8.8Type confusion in PostgreSQL module "refint" allows an object creator to execute arbitrary code as the operating system user running the database. The fix for this emerged as a non-security bug report, and the fix appear in the git repository with subject "refint: Remove plan cache.", without a CVE number. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.
CVE-2026-14680CVSS 8.8Type confusion with PostgreSQL "internal" data type arguments allows any user to execute arbitrary code as the operating system user running the database, via calls to functions with that argument type. Type "internal" represents a class of mutually-incompatible data structures not intended for access from SQL. The system intended to prevent such function calls, but this prevention had gaps. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.
CVE-2026-14677CVSS 8.8Integer wraparound in PostgreSQL 32-bit builds of pltcl and plperl allows an object creator to cause the server to undersize an allocation and write out-of-bounds via crafted function bodies. This may execute arbitrary code as the operating system user running the database. CVE-2026-6473 had fixed similar problems. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.
CVE-2026-14676CVSS 8.8Heap buffer overflow in PostgreSQL pg_stat_statements allows the query author to execute arbitrary code as the operating system user running the database, via crafted queries containing array constants. Within major version 18, minor versions before PostgreSQL 18.6 are affected. Versions before PostgreSQL 18 are unaffected.
CVE-2026-15741CVSS 8.8SQL injection in PostgreSQL EXTRACT() deparse allows an object owner to execute arbitrary SQL as a superuser via a hostile object definition. Attacks affect expression deparse consumers broadly, including pg_dump, psql commands like \sf, and any similar usage in non-core tools. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.

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