Skip to main content
Mallory
HighPublic exploitVulnerability

CVE-2026-6460: Authenticated code execution through PostgreSQL composite-type confusion

Published Nov 12, 2026 · Updated 1 day ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days154 mentions · peak 45 in a dayToday
CVSS8.8High · v3.1
EPSS0.64%45th percentile
CISA KEVNoNot listed
In the wildNonePublic exploit, no exploitation reported
IdentifiersCVE-2026-6460CWE-843 · Access of Resource Using…

CVE-2026-6460 is a type-confusion vulnerability in PostgreSQL's handling of composite types and retained typed values. Inadequate value tracking and the absence of self-identifying type information allow values constructed under an earlier type definition to be interpreted using changed metadata. Stale values can persist in prepared queries, data dictionary entries, PL/pgSQL variables, and other components. The primary trigger involves ALTER ... SET DATA TYPE; other DDL sequences involving column additions and transaction rollback can also expose the flaw. An authenticated object creator can exploit the resulting type confusion to execute arbitrary code as the operating-system account running PostgreSQL. Affected supported branches are PostgreSQL 14.x before 14.25, 15.x before 15.20, 16.x before 16.16, 17.x before 17.12, and 18.x before 18.7.

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 compromises confidentiality, integrity, and availability within the privileges of the PostgreSQL service account. Arbitrary native code execution can expose or modify database data and other resources accessible to that account, bypass database-level authorization boundaries, and disrupt database service. Type confusion can also crash a backend. The vulnerability does not inherently confer operating-system root privileges.

Mitigation

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

No complete operational workaround is documented for unpatched servers. Downstream hardening can partially mitigate exposure by blocking shape-changing ALTER operations while plans or portals retain affected row-type values, including nested types, and rejecting stale PL/pgSQL records and held-cursor values. This hardening is explicitly incomplete and is not a substitute for the upstream fix; transaction-long shape locks can also deadlock with concurrent ALTER operations. Confirm downstream coverage with the package vendor because some legacy-package notices contain inconsistent CVE mappings.

Remediation

Patch, then assume compromise.

Upgrade to PostgreSQL 18.7, 17.12, 16.16, 15.20, or 14.25, or a later fixed release in the applicable branch, and restart the server to activate the update. The fix introduces composite-value version checks, additional locking, and stricter type-dependency checks. Rebuild C-language extensions against the patched release because the fix changes the internal ABI; some extensions also require source changes. Coordinate server and extension updates because extensions built for the patched ABI will not load on unpatched servers. Keep the composite_type_mismatch security checks enabled. Debian trixie provides backported fixes in postgresql-17 version 17.11-0+deb13u1, but complete protection additionally requires the applicable extension rebuilds.

Public exploits

Exploits

3 exploits validated by Mallory's analysis.

View more in app →
CVE-2026-6460-POCThe supplied repository contains README.md (459 bytes) and one standalone Python exploit, poc.py (6,049 bytes). No exploit framework is used. Repository URL, revision, and archive size were not supplied; the listed source files total 6,508 bytes, while size_bytes is left at 0 to indicate unavailable archive metadata. The exploit connects directly to PostgreSQL using psycopg 3, checks the server version, rejects superuser sessions, and obtains the current backend PID. It resolves libc system() locally from process mappings and ELF symbols when possible, or accepts a backend-specific address from the operator. This dependency means the script is not a self-contained remote exploit against an arbitrary server. Its apparent exploitation mechanism is stale composite-value interpretation across prepared statements and ALTER TYPE operations. Two helper stages prepare composite constants containing crafted UUID bytes, change an attribute from uuid to bigint[], and execute the prepared statements through a PL/pgSQL unnest operation to derive pointers to attacker-controlled data. These pointers build a forged callback table containing two system() addresses and a fake header containing the command. A final prepared composite value has its attribute changed from uuid to bytea before execution, attempting to reinterpret the bytes as an external datum and dispatch through the forged callbacks. The hardcoded payload is id>&2. The client checks subsequent backend responsiveness and catches connection failures, but neither observes command output nor proves successful execution. Incorrect pointers or incompatible layouts may disconnect or crash the backend. There is no evidence of exfiltration infrastructure, persistence, or malicious commands targeting the operator. The README attributes the issue to CVE-2026-6460 and claims fixes for PostgreSQL branches 14 through 18 on November 12, 2026. These claims cannot be independently verified from the supplied files; only version 17.11 is explicitly accepted by the code. Both documented invocation examples incorrectly name python.py instead of the supplied poc.py. The final source comment is incomplete, although the executable Python structure appears complete. Analysis is static and does not establish exploit reliability.chor4o · Disclosed Nov 13, 2026 · python · network · localOperationalCVE-2026-6460_PostgreSQL_RCEThis standalone Python exploit repository targets a claimed PostgreSQL composite-type confusion vulnerability identified as CVE-2026-6460. The visible chain prepares values against a UUID-based composite type, changes the attribute type with ALTER TYPE, and executes the stale prepared expression. Helper code demonstrates reinterpretation as bigint[] to disclose heap addresses and as text[] with indirect varlena references to recover 32-bit memory windows through octet_length(). The intended final stage reinterprets a UUID as an expanded bytea object with forged callbacks, directing execution toward system() with a controlled command. The implementation includes fixed-address and documented dynamic PIE-discovery modes, plus build-dependent long-command support. These are exploitation primitives, not merely version checks. The 11-file inventory contains eight Python scripts, two English/Portuguese Markdown documents, and a .gitkeep file. poc_remote_exploit.py is the main entry point and uses psycopg. diag_heap_scan.py locates candidate code pointers; heap_inspect.py produces heap leaks and pauses for GDB; verify_methods.py reads back forged object data without showing a final execution trigger. fast_gadgets.py and gadgets_objdump.py extract binary gadgets, while extract_got_offsets.py derives GOT offsets and long_cmd_extractor.py combines package downloads, static analysis, and Docker-based heap measurements to extend build coverage. Shell and SQL/PLpgSQL occur as embedded commands and strings rather than separate source files. Important limitations: several supplied files are truncated, and offsets_db.py is absent despite documentation claiming automatic selection across 294 builds and 32 distributions. At least the database-dependent helper tools are therefore incomplete as supplied, and the claimed coverage cannot be verified. The CVE attribution, affected ranges, and stated fixed releases (14.25, 15.20, 16.16, 17.12, and 18.7) are repository assertions, not independently validated findings. The main program's success messages rely on backend responsiveness or exception handling and do not independently prove command execution. Backend crashes and service disruption are possible. No obvious fake-exploit behavior or fixed malicious callback destination is visible, but truncated content prevents a complete behavioral audit. The repository URL is taken from the source header; no git ref or archive size was supplied, so these are represented by an empty ref and size 0.gabrielunknown · Disclosed Nov 23, 2026 · python · sql · networkOperationalpostgresql-type-confusion-cve-2026-6460This standalone, five-file repository contains a SQL crash proof of concept and a POSIX shell A/B test harness, plus README.md, LICENSE, and .gitignore. The supplied file sizes total 5,741 bytes; the original repository URL, revision, and archive size were not provided, so those metadata fields are left empty or zero. poc-crash.sql creates a temporary composite type with a UUID attribute and embeds a crafted UUID literal directly into a prepared statement. It then changes the attribute to bytea before executing the statement. The intended failure is a mismatch between the stored datum representation and the current composite descriptor during record output. Embedding the literal in the prepared statement is important: the documentation states that parameterizing it as $1 avoids this captured-state mismatch. run_ab.sh downloads and builds PostgreSQL 17.11, initializes a throwaway cluster, creates a non-superuser test role, submits the SQL, and searches server logs for termination signals. It optionally repeats the test against Homebrew PostgreSQL 17 and terminates matching lab-server processes afterward. Build files, data directories, and logs remain in the temporary workspace. The harness does not verify that the Homebrew installation is actually a fixed version. It also has a relative-path defect: changing into the source directory before resolving dirname "$0" can prevent the documented ./run_ab.sh invocation from finding the SQL file. Although described as using Unix sockets only, the server startup commands do not disable TCP listening with listen_addresses. Standard PostgreSQL defaults may therefore also expose loopback TCP listeners on ports 5544 and 5545. The SQL attack itself requires authenticated database access and could be submitted over a network connection when the target permits it; the included harness uses local sockets. The README attributes the issue to CVE-2026-6460, reports reproduction on macOS Apple Silicon with 17.11, and reports rejection by 17.12 with a row-type-altered error. Those version and remediation claims have not been independently verified here. External research allegedly extends the primitive to native code execution, but this repository includes only the crash trigger, not an information-disclosure or RCE chain. No framework integration, exfiltration, persistence, or attacker-controlled callback endpoint is present.slabbdev · Disclosed Nov 13, 2026 · sql · sh · local · networkPoC
FAQ

Frequently asked questions

Is CVE-2026-6460 exploited in the wild?
As of Nov 26, 2026, Mallory has no reports of CVE-2026-6460 being exploited in the wild. It is not listed in CISA KEV.
Is there a public exploit for CVE-2026-6460?
Yes. Mallory tracks 3 public exploits or proofs of concept for CVE-2026-6460, the earliest disclosed Nov 13, 2026.
Is there a patch for CVE-2026-6460?
Upgrade to PostgreSQL 18.7, 17.12, 16.16, 15.20, or 14.25, or a later fixed release in the applicable branch, and restart the server to activate the update. The fix introduces composite-value version checks, additional locking, and stricter type-dependency checks.
How severe is CVE-2026-6460?
CVE-2026-6460 has a CVSS v3.1 score of 8.8 (High) and an EPSS score of 0.64% (45th percentile) as of Nov 26, 2026.
Activity feed

Recent activity

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

View more in app →
tuxcare security updatesNews · Nov 23, 2026CLSA-2026:1795463070The description associates this CVE with PostgreSQL row-type alteration and stale row-value handling. Downstream hardening blocks conflicting type changes, rejects stale cursor and PL/pgSQL values, and adds type locking. The advisory explicitly calls this a partial mitigation, not upstream Part B; its heading and fixed-CVE field name a different CVE.Read more ↗tuxcare security updatesNews · Nov 23, 2026CLSA-2026:1795464375A PostgreSQL vulnerability discussed in connection with row-type shape changes and stale PL/pgSQL records or held cursors. The update adds downstream hardening that blocks shape-changing ALTER operations while plans or portals retain affected row-type values, including nested types, and rejects stale records and held cursors. This is explicitly a partial mitigation, not upstream Part B. Its transaction-long shape lock can deadlock with a concurrent ALTER. The advisory also includes adapted regression and isolation tests, but does not specify the vulnerability's security impact.Read more ↗tuxcare security updatesNews · Nov 23, 2026CLSA-2026:1795463366The advisory describes downstream PostgreSQL hardening for row-type changes and stale row values. Changes restrict shape-changing ALTER operations, reject stale cursor and PL/pgSQL values, and add type locking. This is explicitly described as a partial mitigation, not upstream Part B. Although this CVE appears in the technical description, the advisory title and fixed-CVE field name CVE-2026-14661 instead.Read more ↗hawkeye blogNews · Nov 20, 2026Weekly Threat Landscape Digest - Week 47 - HawkEyeType confusion in PostgreSQL composite data handling allows an authenticated user with database-object creation or modification privileges to execute code as the PostgreSQL OS account. Exploitation was demonstrated against 18.6. Fixed releases include 18.7, 17.12, 16.16, 15.20, and 14.25.Read more ↗
+36 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 activity110Community discussion across Reddit, Mastodon, and other social sources.