CVE-2026-116307: Arbitrary code execution in PostgreSQL PL/Perl prepared-query handling
A use-after-free vulnerability in PostgreSQL PL/Perl allows a database object creator to execute arbitrary code as the operating system user running the database. Re-entrant PL/Perl execution can free a prepared query while an outer invocation is still executing it, leaving the outer invocation accessing released memory. Affected releases are PostgreSQL 18 before 18.7, 17 before 17.12, 16 before 16.16, 15 before 15.20, and 14 before 14.25.
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 the database server process with the privileges of its operating system account. This can permit access to or modification of database data and other resources accessible to that account, and disruption of database availability. The vulnerability does not establish execution with operating system root privileges.
Mitigation
If you can’t patch tonight, do this now.
Until the update is applied, restrict untrusted database roles from creating or executing plperl functions capable of triggering the vulnerable prepared-query lifecycle. No verified vulnerability-specific workaround is available in the supplied information.
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 corresponding branch. For Debian 12 PostgreSQL 15 packages, version 15.20-0+deb12u1 includes the fix. Stop PostgreSQL, update the server and associated PL/Perl binaries, and restart using the fixed binaries.
Exploits
No public exploits tracked yet. Mallory keeps watching.
Frequently asked questions
- Is CVE-2026-116307 exploited in the wild?
- As of Nov 17, 2026, Mallory has no reports of CVE-2026-116307 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2026-116307?
- As of Nov 17, 2026, Mallory has found no public exploit for CVE-2026-116307.
- Is there a patch for CVE-2026-116307?
- Upgrade to PostgreSQL 18.7, 17.12, 16.16, 15.20, or 14.25, or a later fixed release in the corresponding branch. For Debian 12 PostgreSQL 15 packages, version 15.20-0+deb12u1 includes the fix.
- How severe is CVE-2026-116307?
- CVE-2026-116307 has a CVSS v3.1 score of 8.8 (High) and an EPSS score of 0.59% (49th percentile) as of Nov 17, 2026.
Recent activity
19 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.