CVE-2026-2005 is a heap-based buffer overflow vulnerability in PostgreSQL's pgcrypto extension, affecting PostgreSQL versions before 18.2, 17.8, 16.12, 15.16, and 14.21. The flaw is in public-key decryption handling, specifically the pgp_parse_pubenc_sesskey function in contrib/pgcrypto/pgp-pubdec.c. After PKCS#1 v1.5 unpadding, the code derives a session key length from decrypted message data and copies that many bytes into ctx->sess_key using memcpy, but ctx->sess_key is a fixed-size buffer limited to PGP_MAX_KEY bytes. Because the copy length is not properly bounded and message validation does not enforce an upper limit, a crafted ciphertext and matching key material can cause an out-of-bounds heap write. Successful exploitation can corrupt process memory and lead to arbitrary code execution in the PostgreSQL server process.
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
If you can’t patch tonight, do this now.
Patch, then assume compromise.
2 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos (1 hidden).
Repository is a self-contained proof-of-concept/operational exploit lab for CVE-2026-2005, a heap buffer overflow in PostgreSQL pgcrypto's pgp_parse_pubenc_sesskey(). The repo contains a Docker-based vulnerable environment, a Node.js exploit, and helper verification scripts. Core files: Dockerfile builds PostgreSQL 18.1 from a specific vulnerable commit with pgcrypto and pageinspect; docker-compose.yml exposes the database on 5432 with trust auth and mounts the exploit directory; init.sh initializes the cluster, enables remote access, and listens on all interfaces; exploit.js is the main entry point and implements a 7-stage exploit chain; verify.sh and test-pgcrypto.sql are validation helpers confirming pgcrypto availability rather than exploitation. The main exploit capability in exploit.js is full remote code execution against a reachable PostgreSQL instance after authenticating as a low-privileged user. The chain performs a heap pointer leak, arbitrary read, pointer candidate collection, PIE base resolution, arbitrary write to overwrite CurrentUserId with superuser OID 10, and finally OS command execution via COPY FROM PROGRAM. The exploit is highly environment-specific: it assumes aarch64/ARM64, glibc-dependent heap layout, vulnerable pgcrypto, and access to Docker/container internals for reliable PIE/symbol resolution. This is not merely a detector; it is real exploit code with a configurable command payload (--cmd), making it an operational PoC rather than a framework module.
This repository is a real Python proof-of-concept exploit for CVE-2026-2005, a heap-based buffer overflow in PostgreSQL's pgcrypto extension during PGP session key parsing. The repo is small and focused: README.md documents the vulnerability and exploitation stages, poc.py contains the full exploit logic, and requirements.txt lists dependencies (psycopg2-binary, pwntools, pycryptodome). The exploit is not part of a larger framework. Its main entry point is poc.py, which connects to a PostgreSQL server using supplied credentials and crafts malicious OpenPGP data to trigger the overflow. Based on the README and visible code, the exploit performs a multi-stage chain: generate RSA material and PGP packets, trigger a heap corruption to leak a heap pointer, use a second corruption to obtain an arbitrary read primitive, scan leaked memory for candidate code pointers, compute/vote on possible PIE bases using symbol offsets from a locally supplied postgres ELF binary, validate the recovered base by reading CurrentUserId, then build an arbitrary write primitive that overwrites CurrentUserId with bootstrap superuser OID 10. Once elevated, it executes an arbitrary OS command through PostgreSQL COPY FROM PROGRAM and prints the output. Operationally, this is more than a simple crash PoC: it includes end-to-end exploitation and post-exploitation command execution, but the payload is still basic and operator-supplied rather than modular, so OPERATIONAL is the best fit. The exploit requires a matching vulnerable PostgreSQL build, pgcrypto enabled, valid DB connectivity, and likely an AArch64 target/build environment due to the explicit pwntools architecture setting. Fingerprintable targets/endpoints are primarily the PostgreSQL host/port and the local postgres binary path used for symbol resolution; there are no hardcoded C2 endpoints or exfiltration destinations.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
55 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.
A vulnerability in PostgreSQL addressed indirectly through upgraded third-party components in Tenable Security Center.
A PostgreSQL vulnerability addressed by F5 in BIG-IP Next for Kubernetes; specific technical details are not provided in the content.
A heap buffer overflow in PostgreSQL's pgcrypto extension that can allow arbitrary code execution as the operating system user running the database process when attacker-controlled ciphertext is parsed by pgcrypto decryption routines.
A critical remote code execution vulnerability in PostgreSQL's pgcrypto extension caused by a heap-based buffer overflow in PGP session key parsing logic, enabling arbitrary memory read/write, privilege escalation to PostgreSQL superuser, and operating system command execution under the PostgreSQL service account.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.