PostgreSQL psql \unrestrict lets superuser of pg_dump origin server execute arbitrary code in psql client
Untrusted data inclusion in pg_dump in PostgreSQL allows a malicious superuser of the origin server to inject arbitrary code for restore-time execution as the client operating system account running psql to restore the dump, via psql \restrict meta-command input expansion. The fix for CVE-2025-8714 introduced \restrict and \unrestrict to block this attack, but \unrestrict itself was sufficient for an attack. pg_dumpall is also affected. pg_restore is affected when used to generate a plain-format dump. Non-core use of \restrict would be affected, but we've not identified non-core use. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.
- BDU:2026-11972
- EUVD-2026-57852
- ALSA-2026:67280
- ALSA-2026:67491
- ALSA-2026:67848
- ALSA-2026:69607
- ALSA-2026:69876
- ALSA-2026:69914
- ALSA-2026:69923
- ALSA-2026:70186
- openSUSE-SU-2026:11552-1
- openSUSE-SU-2026:11553-1
- openSUSE-SU-2026:11554-1
- openSUSE-SU-2026:11555-1
- openSUSE-SU-2026:21699-1
- openSUSE-SU-2026:21700-1
- openSUSE-SU-2026:21701-1
- openSUSE-SU-2026:21702-1
- RHSA-2026:67280
- RHSA-2026:67491
- Published
- Aug 13, 2026
- Updated
- Aug 29, 2026
- EPSS
- 0.4% · 27th percentile
- CWE
- CWE-829
Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.
Report tools
Action score
35
Monitor
Low priority for now.
- CVSS
- 35 / 40 · 8.8 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.4%
CISA SSVC decision
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- —
- CNA · PostgreSQL
- 8.8
- NVD has not scored this yet; the score shown is the CNA’s.
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Noroxi analysis
No Noroxi analysis for this record yet
We don't hand-write analysis for the hundreds of thousands of vulnerabilities in the database; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.
We use this product, ask for helpAffected systems
| Vendor | Product | CPE |
|---|---|---|
| postgresql | postgresql | cpe:2.3:a:postgresql:postgresql |
Using postgresql? Add it to your stack and be the first to know about CVEs like this one. (PostgreSQL)
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- postgresql postgresql14.0 and later · before 14.24
- postgresql postgresql15.0 and later · before 15.19
- postgresql postgresql16.0 and later · before 16.15
- postgresql postgresql17.0 and later · before 17.11
- postgresql postgresql18.0 and later · before 18.5
Versions reported by the vendor
Affected version ranges reported by the assigning authority (PostgreSQL). Independent of NVD's CPE analysis and usually ahead of it.
n/a PostgreSQL
- 18 and later · before 18.6affected · rpm
- 17 and later · before 17.11affected · rpm
- 16 and later · before 16.15affected · rpm
- 15 and later · before 15.19affected · rpm
- before 14.24affected · rpm
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| AlmaLinux:10 | postgresql | before 16.15-1.el10_2 | 16.15-1.el10_2 |
| AlmaLinux:10 | postgresql-contrib | before 16.15-1.el10_2 | 16.15-1.el10_2 |
| AlmaLinux:10 | postgresql-docs | before 16.15-1.el10_2 | 16.15-1.el10_2 |
| AlmaLinux:10 | postgresql-plperl | before 16.15-1.el10_2 | 16.15-1.el10_2 |
| AlmaLinux:10 | postgresql-plpython3 | before 16.15-1.el10_2 | 16.15-1.el10_2 |
| AlmaLinux:10 | postgresql-pltcl | before 16.15-1.el10_2 | 16.15-1.el10_2 |
| AlmaLinux:10 | postgresql-private-devel | before 16.15-1.el10_2 | 16.15-1.el10_2 |
| AlmaLinux:10 | postgresql-private-libs | before 16.15-1.el10_2 | 16.15-1.el10_2 |
| AlmaLinux:10 | postgresql-server | before 16.15-1.el10_2 | 16.15-1.el10_2 |
| AlmaLinux:10 | postgresql-server-devel | before 16.15-1.el10_2 | 16.15-1.el10_2 |
| AlmaLinux:10 | postgresql-static | before 16.15-1.el10_2 | 16.15-1.el10_2 |
| AlmaLinux:10 | postgresql-test | before 16.15-1.el10_2 | 16.15-1.el10_2 |
| AlmaLinux:10 | postgresql-test-rpm-macros | before 16.15-1.el10_2 | 16.15-1.el10_2 |
| AlmaLinux:10 | postgresql-upgrade | before 16.15-1.el10_2 | 16.15-1.el10_2 |
| AlmaLinux:10 | postgresql-upgrade-devel | before 16.15-1.el10_2 | 16.15-1.el10_2 |
| AlmaLinux:10 | postgresql18 | before 18.6-1.el10_2 | 18.6-1.el10_2 |
| AlmaLinux:10 | postgresql18-contrib | before 18.6-1.el10_2 | 18.6-1.el10_2 |
| AlmaLinux:10 | postgresql18-docs | before 18.6-1.el10_2 | 18.6-1.el10_2 |
| AlmaLinux:10 | postgresql18-plperl | before 18.6-1.el10_2 | 18.6-1.el10_2 |
| AlmaLinux:10 | postgresql18-plpython3 | before 18.6-1.el10_2 | 18.6-1.el10_2 |
| AlmaLinux:10 | postgresql18-private-devel | before 18.6-1.el10_2 | 18.6-1.el10_2 |
| AlmaLinux:10 | postgresql18-private-libs | before 18.6-1.el10_2 | 18.6-1.el10_2 |
| AlmaLinux:10 | postgresql18-server | before 18.6-1.el10_2 | 18.6-1.el10_2 |
| AlmaLinux:10 | postgresql18-server-devel | before 18.6-1.el10_2 | 18.6-1.el10_2 |
+96
Same product
postgresql: all recordsOther highest-scoring records for the same primary product.
- CVE-2017-7546PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to incorrect authentication flaw allowing remote attackers57Plan
- CVE-2019-9193In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_server_program' group to 55Plan
- CVE-2020-25695A flaw was found in PostgreSQL versions before 13.1, before 12.5, before 11.10, before 10.15, before 9.6.20 and before 9.5.24.49Plan
- CVE-2007-3280The Database Link library (dblink) in PostgreSQL 8.1 implements functions via CREATE statements that map to arbitrary libraries based on the44Plan
- CVE-2013-1899Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9, and 9.0.x before 9.0.13 allows remote attackers to ca42Plan
- CVE-2018-16850postgresql before versions 11.1, 10.6 is vulnerable to a to SQL injection in pg_upgrade and pg_dump via CREATE TRIGGER ...41Plan
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| n/a PostgreSQL | 14.24 | Vendor (CNA) |
| n/a PostgreSQL | 15.19 | Vendor (CNA) |
| n/a PostgreSQL | 16.15 | Vendor (CNA) |
| n/a PostgreSQL | 17.11 | Vendor (CNA) |
| n/a PostgreSQL | 18.6 | Vendor (CNA) |
| azl3 postgresql 16.14-1 on Azure Linux 3.0 | 16.15-1 · CBL-Mariner Releases | Microsoft (MSRC) |
| almalinux:postgresql18 | 18.6-1.el10_2 · AlmaLinux:10 | Package registry (OSV) |
| almalinux:postgresql18-contrib | 18.6-1.el10_2 · AlmaLinux:10 | Package registry (OSV) |
| almalinux:postgresql18-docs | 18.6-1.el10_2 · AlmaLinux:10 | Package registry (OSV) |
| almalinux:postgresql18-plperl | 18.6-1.el10_2 · AlmaLinux:10 | Package registry (OSV) |
| almalinux:postgresql18-plpython3 | 18.6-1.el10_2 · AlmaLinux:10 | Package registry (OSV) |
| almalinux:postgresql18-private-devel | 18.6-1.el10_2 · AlmaLinux:10 | Package registry (OSV) |
| almalinux:postgresql18-private-libs | 18.6-1.el10_2 · AlmaLinux:10 | Package registry (OSV) |
| almalinux:postgresql18-server | 18.6-1.el10_2 · AlmaLinux:10 | Package registry (OSV) |
| almalinux:postgresql18-server-devel | 18.6-1.el10_2 · AlmaLinux:10 | Package registry (OSV) |
| almalinux:postgresql18-static | 18.6-1.el10_2 · AlmaLinux:10 | Package registry (OSV) |
| almalinux:postgresql18-test | 18.6-1.el10_2 · AlmaLinux:10 | Package registry (OSV) |
| almalinux:postgresql18-test-rpm-macros | 18.6-1.el10_2 · AlmaLinux:10 | Package registry (OSV) |
| alpine:postgresql16 | 16.15-r0 · Alpine:v3.21 | Package registry (OSV) |
| alpine:postgresql17 | 17.11-r0 · Alpine:v3.21 | Package registry (OSV) |
| alpine:postgresql18 | 18.5-r0 · Alpine:v3.23 | Package registry (OSV) |
| debian:postgresql-15 | 15.19-0+deb12u1 · Debian:12 | Package registry (OSV) |
| debian:postgresql-17 | 17.11-0+deb13u1 · Debian:13 | Package registry (OSV) |
| debian:postgresql-18 | 18.6-1 · Debian:14 | Package registry (OSV) |
| opensuse:postgresql14 | 14.24-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| opensuse:postgresql15 | 15.19-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| opensuse:postgresql16 | 16.15-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| opensuse:postgresql17 | 17.11-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| red hat:postgresql18 | 0:18.6-1.el10_2 · Red Hat:enterprise_linux:10.2 | Package registry (OSV) |
| red hat:postgresql18-contrib | 0:18.6-1.el10_2 · Red Hat:enterprise_linux:10.2 | Package registry (OSV) |
+21
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
No commit or PR link among the references.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
- CVE-2026-64640 days apartPostgreSQL psql COPY FROM STDIN early failure processes data lines as psql commands32Monitor
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- A user must open a link or visit a page.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-829 · Inclusion of Functionality from Untrusted Control SphereCVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
nvd-secondary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- Code InclusionCAPEC-175likelihood: Medium · Very High
- Serialized Data External LinkingCAPEC-201likelihood: High · High
- DTD InjectionCAPEC-228Medium
- Local Code InclusionCAPEC-251Medium
- PHP Local File InclusionCAPEC-252Medium
- Remote Code InclusionCAPEC-253
- Force Use of Corrupted FilesCAPEC-263Medium
- Open-Source Library ManipulationCAPEC-538likelihood: Low · High
ATT&CK techniques
- Process InjectionT1055
- Browser ExtensionsT1176
- Supply Chain Compromise: Software Dependencies and Development ToolsT1195.001
- Server Software Component: IIS ComponentsT1505.004
- Server Software Component: Terminal Services DLLT1505.005
- Hijack Execution Flow: Dynamic Linker HijackingT1574.006
- Hijack Execution Flow: KernelCallbackTableT1574.013
- Reflective Code LoadingT1620
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Vendor advisories and official records. Exploit/PoC links are deliberately left out.