Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2026-18408— PostgreSQL psql \unrestrict lets superuser of pg_dump origin server execute arbitrary code in psql client

Quick assessment

Affected
n/a PostgreSQL
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

PostgreSQL是PostgreSQL组织开源的一套自由的对象关系型数据库管理系统。该系统支持大部分SQL标准并且提供了许多其他特性,例如外键、触发器、视图等。 PostgreSQL 18.5之前版本、17.11之前版本、16.15之前版本、15.19之前版本和14.24之前版本存在软件供应链问题漏洞,该漏洞源于pg_dump中的不受信任数据包含问题,允许恶意超级用户通过psql \restrict元命令输入扩展注入任意代码,导致以运行psql的客户端操作系统账户执行任意代码。

CVSS 8.8 · High EPSS 0.36% · P30

Possible ATT&CK Techniques 1 AI

T1059 · Command and Scripting Interpreter

Affected Version Matrix 5

VendorProduct Version RangeStatus
n/a PostgreSQL 18< 18.6 affected
17< 17.11 affected
16< 16.15 affected
15< 15.19 affected
< 14.24 affected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-18408

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
PostgreSQL psql \unrestrict lets superuser of pg_dump origin server execute arbitrary code in psql client
Source: CVE Program / CVE List V5
Vulnerability Description
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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
从非可信控制范围包含功能例程
Source: CVE Program / CVE List V5
Vulnerability Title
PostgreSQL 软件供应链问题漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
PostgreSQL是PostgreSQL组织开源的一套自由的对象关系型数据库管理系统。该系统支持大部分SQL标准并且提供了许多其他特性,例如外键、触发器、视图等。 PostgreSQL 18.5之前版本、17.11之前版本、16.15之前版本、15.19之前版本和14.24之前版本存在软件供应链问题漏洞,该漏洞源于pg_dump中的不受信任数据包含问题,允许恶意超级用户通过psql \restrict元命令输入扩展注入任意代码,导致以运行psql的客户端操作系统账户执行任意代码。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
- PostgreSQL 18 ~ 18.6 -

II. Public POCs for CVE-2026-18408

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-18408

登录查看更多情报信息。

Vendor Advisories for CVE-2026-18408 (1)

Same Patch Batch · n/a · 2026-08-13 · 31 CVEs total

CVE-2026-14671 8.8 HIGH PostgreSQL refint plan cache type confusion executes arbitrary code
CVE-2026-16239 8.8 HIGH PostgreSQL type confusion in cursor CLOSE + DECLARE executes arbitrary code
CVE-2026-16238 8.8 HIGH PostgreSQL type confusion in pg_restore_attribute_stats() executes arbitrary code
CVE-2026-15742 8.8 HIGH PostgreSQL fuzzystrmatch writes effectively-arbitrary addresses, via integer wraparound
CVE-2026-15741 8.8 HIGH PostgreSQL expression deparse allows SQL injection via EXTRACT argument
CVE-2026-14680 8.8 HIGH PostgreSQL type confusion via "internal" arguments
CVE-2026-19385 8.8 HIGH PostgreSQL pg_dump heap buffer overflow executes arbitrary code
CVE-2026-14677 8.8 HIGH PostgreSQL 32-bit pltcl and plperl undersize allocations, via integer wraparound
CVE-2026-14676 8.8 HIGH PostgreSQL pg_stat_statements heap buffer overflow executes arbitrary code
CVE-2026-14670 8.8 HIGH PostgreSQL plperl tied object heap buffer overflow executes arbitrary code
CVE-2026-14669 8.8 HIGH PostgreSQL to_char heap buffer overflow executes arbitrary code
CVE-2026-14664 8.8 HIGH PostgreSQL regexp heap buffer overflow executes arbitrary code
CVE-2026-14662 8.8 HIGH PostgreSQL tsvector and tsquery undersize allocations, via integer wraparound
CVE-2026-14679 8.2 HIGH PostgreSQL stack buffer overflow in argument match writes 0x0 and 0x1 to server memory
CVE-2026-6464 8.1 HIGH PostgreSQL psql COPY FROM STDIN early failure processes data lines as psql commands
CVE-2026-14668 8.1 HIGH PostgreSQL ctid type confusion in selectivity estimator discloses derivative of arbitrary
CVE-2026-6471 7.2 HIGH PostgreSQL logical decoding can dlopen arbitrary file
CVE-2026-14663 6.5 MEDIUM PostgreSQL pgcrypto, for OpenSSL-disabled ciphers, silently encrypts to and decrypts from
CVE-2026-14672 5.3 MEDIUM PostgreSQL observable response discrepancy with non-default scram_iterations provides user
CVE-2026-6470 4.3 MEDIUM PostgreSQL fails to check type USAGE privilege

Showing top 20 of 31 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2026-18408

No comments yet


Leave a comment