Skip to main content
Mallory
HighPublic exploitVulnerability

CVE-2026-6460: Authenticated Code Execution in PostgreSQL Composite-Type Handling

Published Nov 12, 2026 · Updated 3 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days145 mentions · peak 45 in a dayToday
CVSS8.8High · v3.1
EPSS0.64%51st 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 caused by inadequate tracking of retained values when composite-type definitions change. Existing binary values can subsequently be interpreted using incompatible, updated type metadata. Stale values can persist in prepared statements, data dictionary entries, PL/pgSQL variables, and other internal structures. The primary trigger is ALTER ... SET DATA TYPE, although other DDL sequences involving column addition and transaction rollback can also expose the flaw. A demonstrated path causes record_out() to select an incompatible output handler, allowing retained bytes to be interpreted as an expanded-object representation. This can cause backend crashes or redirect native callbacks for arbitrary code execution. Affected supported branches are PostgreSQL 14 before 14.25, 15 before 15.20, 16 before 16.16, 17 before 17.12, and 18 before 18.7; older branches are also affected.

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.

An authenticated database object creator can execute arbitrary native code with the privileges of the operating-system account running PostgreSQL. This crosses the boundary between ordinary database privileges and database-service operating-system access, potentially compromising database confidentiality, integrity, and availability. Successful exploitation can expose or modify information accessible to that account and disrupt database service. Demonstrated malformed-value handling also causes backend crashes, while related uses of the type-confusion primitive disclose memory addresses useful for bypassing ASLR. Operating-system root privileges are not inherently granted.

Mitigation

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

No complete operational workaround is documented for unpatched servers. Restrict database access to trusted principals and remove unnecessary object-creation privileges to reduce exposure, without treating those measures as a substitute for patching. Some downstream packages provide partial hardening that blocks shape-changing ALTER operations while plans or portals retain affected row-type values and rejects stale PL/pgSQL records and held cursors. This hardening is explicitly incomplete and can introduce deadlocks with concurrent ALTER operations. Verify managed-service patch coverage rather than assuming provider mitigations constitute full remediation.

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, or install a vendor-confirmed equivalent security backport. The upstream fix adds composite-attribute versioning, value-version checks, additional locking, and stricter type-alteration dependency checks. Full protection also requires rebuilding installed C-language extensions against the patched server; some extensions require source changes. Coordinate extension rebuilds with the server update because the fix changes the internal ABI, and restart the database service to activate the updated binaries. Keep the composite_type_mismatch security checks enabled. Migrate obsolete branches to a supported release; PostgreSQL 14.25 is the final PostgreSQL 14 release.

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 21, 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, or install a vendor-confirmed equivalent security backport. The upstream fix adds composite-attribute versioning, value-version checks, additional locking, and stricter type-alteration 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% (51st percentile) as of Nov 21, 2026.
Activity feed

Recent activity

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

View more in app →
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 ↗tuxcare security updatesNews · Nov 20, 2026CLSA-2026:1795165157A PostgreSQL vulnerability addressed through downstream hardening of row-type changes and rejection of stale PL/pgSQL records and held cursors. The advisory describes only a partial mitigation, not upstream Part B, and warns that the transaction-duration shape lock can deadlock with a concurrent ALTER. Updated PostgreSQL 9.2.24 packages are provided. This CVE appears in the description but not in the advisory's separate list of fixed CVEs.Read more ↗tuxcare security updatesNews · Nov 20, 2026CLSA-2026:1795164654A PostgreSQL vulnerability involving row-type changes and stale records or cursors. The advisory describes downstream hardening that blocks shape-changing ALTER operations while row-type values are held and rejects stale PL/pgSQL records and held cursors. This is explicitly a partial mitigation, not upstream Part B, and can introduce deadlocks with concurrent ALTER operations. Although described in the change notes, this CVE is absent from the advisory's separate 'CVEs fixed' list.Read more ↗tuxcare security updatesNews · Nov 20, 2026CLSA-2026:1795164643A PostgreSQL vulnerability involving row-type shape changes and stale records or cursors. The advisory describes downstream hardening for PostgreSQL 9.2 that blocks relevant ALTER operations and rejects stale records and held cursors. This is explicitly a partial mitigation, not upstream Part B, and its transaction-duration locking can cause deadlocks with concurrent ALTER operations. This CVE appears in the description but not in the advisory's separate 'CVEs fixed' list.Read more ↗
+30 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 activity107Community discussion across Reddit, Mastodon, and other social sources.