CVERadar
HIGH · CVSS 3.1 8.8Public PoCEPSS 1.37% (p72)Threat level 48

CVE-2026-2005: CVE-2026-2005: Heap buffer overflow in PostgreSQL pgcrypto allows a ciphertext provider to execute arbitr…

postgresql · postgresql · NVD published 2026-02-12 · posted 2026-05-04 · last modified 2026-07-15

What it is

Heap buffer overflow in PostgreSQL pgcrypto allows a ciphertext provider to execute arbitrary code as the operating system user running the database. Versions before PostgreSQL 18.2, 17.8, 16.12, 15.16, and 14.21 are affected.

WeaknessCWE-122CWE-120
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (source: f86ef6dc-4d3a-42ad-8f28-e6d5547a5007)
ATT&CK tacticsExecution

Exploitation evidence

First exploit evidence seen: 2026-05-04 (earliest date across the sources below).

Exploited in the wild

No source on this site lists in-the-wild exploitation yet (CISA KEV, VulnCheck KEV).

Public exploit code

GitHub proof-of-concept repositories

4 public repositories from 4 accounts, first seen 2026-05-04. Most starred: var77/CVE-2026-2005 (27 stars), view repository.

Verify before running: public PoCs can be malicious. Read the code and only run it in an isolated lab. A PoC means exploit code is public, not that this CVE is exploited in the wild.

Sources: nomi-sec/PoC-in-GitHub.

How to fix it

Fixed versions

  • postgresql postgresql: upgrade to 14.21 or later (affected from 14.0)
  • postgresql postgresql: upgrade to 15.16 or later (affected from 15.0)
  • postgresql postgresql: upgrade to 16.12 or later (affected from 16.0)
  • postgresql postgresql: upgrade to 17.8 or later (affected from 17.0)
  • postgresql postgresql: upgrade to 18.2 or later (affected from 18.0)

Derived from the NVD CPE configuration (versionEndExcluding / versionEndIncluding). Always confirm with the vendor advisory.

Vendor advisories and patches

MITRE ATT&CK mitigations for this chain

  • M1050 Exploit Protection (for T1203) : Security applications that look for behavior used during exploitation such as Windows Defender Exploit Guard (WDEG) and the Enhanced Mitigation Experience Toolkit (EMET) can be used to mitigate some exploitation behavior. Control flow integrity checking is another way to potentially identify and stop a software exploi
  • M1051 Update Software (for T1203) : Perform regular software updates to mitigate exploitation risk. Keeping software up-to-date with the latest security patches helps prevent adversaries from exploiting known vulnerabilities in client software, reducing the risk of successful attacks.
  • M1048 Application Isolation and Sandboxing (for T1203) : Browser sandboxes can be used to mitigate some of the impact of exploitation, but sandbox escapes may still exist. Other types of virtualization and application microsegmentation may also mitigate the impact of client-side exploitation. Risks of additional exploits and weaknesses in those systems may still exist.

Detection Generic guidance

  • Execution: Watch for the service process spawning shells or script interpreters (cmd.exe, powershell, sh, bash, python) via EDR process-tree rules.

Response checklist Generic guidance

  1. Inventory: find every instance of the affected product and version (include internet-facing and forgotten ones).
  2. Patch or mitigate per the vendor advisory; if you cannot patch, remove internet exposure or apply the vendor workaround.
  3. Assume compromise if the system was exposed before patching: hunt for the indicators in the advisory and review logs back to the disclosure date.
  4. Rotate credentials and secrets stored on or used by the affected system if compromise cannot be ruled out.

Sources