Skip to main content
Mallory
MediumVulnerability

CVE-2025-12818: Integer wraparound denial of service in PostgreSQL libpq

Published Nov 13, 2025 · Updated 11 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS5.9Medium · v3.1
EPSS0.36%31st percentile
CISA KEVNoNot listed
In the wildNoneNo exploitation reported
IdentifiersCVE-2025-12818CWE-190 · Integer Overflow or Wraparound

CVE-2025-12818 is an integer-wraparound vulnerability in multiple PostgreSQL libpq client-library functions. Affected code includes PQescapeInternal, called by PQescapeLiteral and PQescapeIdentifier, where signed integer counters used to count quotes and backslashes can overflow while processing extremely long strings. The resulting allocation-size calculation produces an undersized heap buffer, followed by out-of-bounds writes extending hundreds of megabytes beyond the allocation and a segmentation fault in the consuming application. Affected releases precede PostgreSQL 18.1, 17.7, 16.11, 15.15, 14.20, and 13.23 in their respective branches.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation crashes an application using vulnerable libpq, causing denial of service. Higher-level applications and language drivers that invoke affected libpq functions can also be affected, including PHP applications using PDO PostgreSQL identifier escaping. The CVSS v3.0 score is 5.9, with high availability impact and no assessed confidentiality or integrity impact. Arbitrary code execution and privilege escalation are not established.

Mitigation

If you can’t patch tonight, do this now.

No vulnerability-specific temporary workaround is documented. Upgrading the affected client library or the product bundling it is the established corrective action.

Remediation

Patch, then assume compromise.

Update libpq and associated PostgreSQL packages to versions 18.1, 17.7, 16.11, 15.15, 14.20, or 13.23, or later fixed releases within the corresponding branch. Vendor-provided security backports are also applicable. Ensure consuming applications and bundled client libraries use the corrected library; updating only the database server does not address a separately installed vulnerable client library. For affected Splunk SOAR deployments, upgrade to version 8.5.0 or later. Fixed VMware Tanzu for Postgres releases include 18.1.0, 17.7.0, 16.11.0, 15.15.0, 14.20.0, and 13.23.0.

Public exploits

Exploits

No public exploits tracked yet. Mallory keeps watching.

View more in app →
No public exploit code observed for this vulnerability. Mallory keeps watching.
FAQ

Frequently asked questions

Is CVE-2025-12818 exploited in the wild?
As of Nov 7, 2026, Mallory has no reports of CVE-2025-12818 being exploited in the wild. It is not listed in CISA KEV.
Is there a public exploit for CVE-2025-12818?
As of Nov 7, 2026, Mallory has found no public exploit for CVE-2025-12818.
Is there a patch for CVE-2025-12818?
Update libpq and associated PostgreSQL packages to versions 18.1, 17.7, 16.11, 15.15, 14.20, or 13.23, or later fixed releases within the corresponding branch. Vendor-provided security backports are also applicable.
How severe is CVE-2025-12818?
CVE-2025-12818 has a CVSS v3.1 score of 5.9 (Medium) and an EPSS score of 0.36% (31st percentile) as of Nov 7, 2026.
Activity feed

Recent activity

32 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
tenable cloud security pluginsNews · Oct 2, 2026Echo: postgresql-13: security update to 13.23postgresql-14: se... | Tenable®An integer wraparound vulnerability in PostgreSQL's libpq client library causes undersized memory allocations and large out-of-bounds writes, crashing applications using the library. Affected versions precede PostgreSQL 18.1, 17.7, 16.11, 15.15, 14.20, and 13.23. The advisory rates the vulnerability Medium, with a CVSS v3 base score of 5.9, reflecting high availability impact.Read more ↗tenable nessus pluginsNews · Sep 30, 2026AlmaLinux 9.2 [TuxCare] Security Update: libpq / libpq-devel (... | Tenable®A vulnerability tracked as CVE-2025-12818 addressed by an Alma Linux security advisory. The supplied information assigns an Important vendor severity and a CVSS v3 availability-impact vector (AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H), but does not describe the underlying flaw type.Read more ↗tenable nessus pluginsNews · Sep 30, 2026AlmaLinux 9.6 [TuxCare] Security Update: postgresql / postgres... | Tenable®An Important-severity vulnerability tracked as CVE-2025-12818, affecting an AlmaLinux 9.6 package or component not identified in the provided content. The listed CVSS v3 vector indicates a network-reachable, high-complexity unauthenticated denial-of-service impact, with no stated confidentiality or integrity impact.Read more ↗tenable nessus pluginsNews · Sep 30, 2026Rocky Linux 9.6 [TuxCare] Security Update: postgresql / postgr... | Tenable®A vulnerability tracked as CVE-2025-12818 affecting a Rocky Linux 9.6 package covered by the TuxCare advisory CLSA-2026-1768910677. The supplied metadata rates it Important and provides a CVSS v3 availability-impact vector (AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H).Read more ↗
+2 more in the timeline. Sign up to see them
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity14Community discussion across Reddit, Mastodon, and other social sources.