{"id":"CVE-2026-6464","year":2026,"sequence":6464,"component":"client","score":8.1,"cvss_version":"3.0","vector":"AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","first_published":"2026-08-13","source_url":"https://www.postgresql.org/support/security/CVE-2026-6464/","facts":{"affected":{"14":"14","15":"15","16":"16","17":"17","18":"18"},"affected_ranges":[{"from":"0","until":"14.24"},{"from":"15","until":"15.19"},{"from":"16","until":"16.15"},{"from":"17","until":"17.11"},{"from":"18","until":"18.6"}],"cna_url":"https://cveawg.mitre.org/api/cve/CVE-2026-6464","component":"client","cvss_version":"3.0","description_en":"Untrusted data inclusion in PostgreSQL psql COPY may allow a server administrator to elicit execution of data lines as psql commands, via error injection. If the \"COPY FROM STDIN\" or \"\\copy FROM STDIN\" command fails before the server indicates that it awaits input rows, psql processes the in-line data rows as psql commands. \"COPY FROM\" with a filename is unaffected. The server administrator has no inherent control over the data rows, so a complete attack requires the attacker to separately acquire control of both the server and the data rows. Alternatively, an attacker controlling data rows alone might complete an attack through a coincidental error that they don't control. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.","first_published":"2026-08-13","fixed":{"14":"14.24","15":"15.19","16":"16.15","17":"17.11","18":"18.6"},"id":"CVE-2026-6464","introduced":{},"published":{"14":"2026-08-13","15":"2026-08-13","16":"2026-08-13","17":"2026-08-13","18":"2026-08-13"},"score":8.1,"title":"PostgreSQL psql COPY FROM STDIN early failure processes data lines as psql commands","url":"https://www.postgresql.org/support/security/CVE-2026-6464/","vector":"AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"},"reviewed_hash":"6a65a7884245936f6adaef8709d290d460e999dfce1ad78734fa7c9a324ed325","source_hash":"965b9e2323feab543f3cbeb74c418c3a5b43cbefc6594d2862ff0d24dcf8e6a2","text":{"locale":"en","title":"PostgreSQL psql COPY FROM STDIN early failure processes data lines as psql commands","description":"Untrusted data inclusion in PostgreSQL psql COPY may allow a server administrator to elicit execution of data lines as psql commands, via error injection. If the \"COPY FROM STDIN\" or \"\\copy FROM STDIN\" command fails before the server indicates that it awaits input rows, psql processes the in-line data rows as psql commands. \"COPY FROM\" with a filename is unaffected. The server administrator has no inherent control over the data rows, so a complete attack requires the attacker to separately acquire control of both the server and the data rows. Alternatively, an attacker controlling data rows alone might complete an attack through a coincidental error that they don't control. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.","details":null,"format":"plain","provenance":{"fetched_at":"2026-09-26T10:56:06+00:00","path":"compare/security.json","root":"source-data","sha256":"6a65a7884245936f6adaef8709d290d460e999dfce1ad78734fa7c9a324ed325","source_archive_sha256":"8d8ad63581e1d27b3a0f995ded3feb81c265e38b2ac652eb22f022f52c2240ec","source_revision":"004bc292ee31c11f9a41ab007e9d8116bce29a71","source_url":"https://www.postgresql.org/support/security/"},"text_hash":"8762c945dcc1b4ff8b17b07c5a2189438186862e24bfa16bcc602dd4c2284df7"},"locales":["en","zh-Hans"],"fixes":[{"major":"14","fixed_version":"14.24","introduced":null,"published_date":"2026-08-13","facts":{"fixed":"14.24","introduced":null,"published":"2026-08-13"}},{"major":"15","fixed_version":"15.19","introduced":null,"published_date":"2026-08-13","facts":{"fixed":"15.19","introduced":null,"published":"2026-08-13"}},{"major":"16","fixed_version":"16.15","introduced":null,"published_date":"2026-08-13","facts":{"fixed":"16.15","introduced":null,"published":"2026-08-13"}},{"major":"17","fixed_version":"17.11","introduced":null,"published_date":"2026-08-13","facts":{"fixed":"17.11","introduced":null,"published":"2026-08-13"}},{"major":"18","fixed_version":"18.6","introduced":null,"published_date":"2026-08-13","facts":{"fixed":"18.6","introduced":null,"published":"2026-08-13"}}],"legacy":[{"source":"center","source_id":85,"observed_at":"2026-10-03 12:08:35.169032+08","raw":{"id":85,"cve":"2026-6464","public":true,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","details":"PostgreSQL psql 的 COPY 命令若纳入不可信数据，服务器管理员可能通过注入错误，诱使 psql 把数据行作为命令执行。如果 COPY FROM STDIN 或 \\copy FROM STDIN 在服务器表示已准备接收输入行之前失败， psql 就会把后续内联数据行当作 psql 命令处理；指定文件名的 COPY FROM 不受影响。服务器管理员本身 无法控制这些数据行，因此完整利用通常需要攻击者同时控制服务器与数据行。另一种可能是，攻击者仅控制数据行， 再借助一个其无法控制但恰好发生的错误完成攻击。PostgreSQL 18.6、17.11、16.15、15.19 和 14.24 之前的版本受此问题影响。","component":"client","cvenumber":202606464,"description":"PostgreSQL psql 的 COPY FROM STDIN 提前失败时会把数据行当作 psql 命令执行","detailslink":"","legacyscore":"","newspost_id":3365},"fixes":[{"source_id":342,"source_version_id":31,"major":"18","fixed_minor":6,"raw":{"id":342,"patch_id":85,"version_id":31,"fixed_minor":6},"version_raw":{"id":31,"tree":18.0,"current":true,"docsgit":"","eoldate":"2030-11-14","reldate":"2026-08-13","testing":0,"supported":true,"docsloaded":"2026-09-27T08:10:47.078613+08:00","latestminor":6,"firstreldate":"2025-09-25"}},{"source_id":343,"source_version_id":30,"major":"17","fixed_minor":11,"raw":{"id":343,"patch_id":85,"version_id":30,"fixed_minor":11},"version_raw":{"id":30,"tree":17.0,"current":false,"docsgit":"","eoldate":"2029-11-08","reldate":"2026-08-13","testing":0,"supported":true,"docsloaded":"2026-09-27T08:10:47.078613+08:00","latestminor":11,"firstreldate":"2024-09-26"}},{"source_id":344,"source_version_id":29,"major":"16","fixed_minor":15,"raw":{"id":344,"patch_id":85,"version_id":29,"fixed_minor":15},"version_raw":{"id":29,"tree":16.0,"current":false,"docsgit":"","eoldate":"2028-11-09","reldate":"2026-08-13","testing":0,"supported":true,"docsloaded":"2026-09-27T08:10:47.078613+08:00","latestminor":15,"firstreldate":"2023-09-14"}},{"source_id":345,"source_version_id":28,"major":"15","fixed_minor":19,"raw":{"id":345,"patch_id":85,"version_id":28,"fixed_minor":19},"version_raw":{"id":28,"tree":15.0,"current":false,"docsgit":"","eoldate":"2027-11-11","reldate":"2026-08-13","testing":0,"supported":true,"docsloaded":"2026-09-27T08:10:47.078613+08:00","latestminor":19,"firstreldate":"2022-10-13"}},{"source_id":346,"source_version_id":27,"major":"14","fixed_minor":24,"raw":{"id":346,"patch_id":85,"version_id":27,"fixed_minor":24},"version_raw":{"id":27,"tree":14.0,"current":false,"docsgit":"","eoldate":"2026-11-12","reldate":"2026-08-13","testing":0,"supported":true,"docsloaded":"2026-09-27T08:10:47.078613+08:00","latestminor":24,"firstreldate":"2021-09-30"}}]},{"source":"pgweb","source_id":85,"observed_at":"2026-10-03 12:08:55.967155+08","raw":{"id":85,"cve":"2026-6464","public":true,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","details":"PostgreSQL psql 的 COPY 命令若纳入不可信数据，服务器管理员可能通过注入错误，诱使 psql 把数据行作为命令执行。如果 COPY FROM STDIN 或 \\copy FROM STDIN 在服务器表示已准备接收输入行之前失败， psql 就会把后续内联数据行当作 psql 命令处理；指定文件名的 COPY FROM 不受影响。服务器管理员本身 无法控制这些数据行，因此完整利用通常需要攻击者同时控制服务器与数据行。另一种可能是，攻击者仅控制数据行， 再借助一个其无法控制但恰好发生的错误完成攻击。PostgreSQL 18.6、17.11、16.15、15.19 和 14.24 之前的版本受此问题影响。","component":"client","cvenumber":202606464,"description":"PostgreSQL psql 的 COPY FROM STDIN 提前失败时会把数据行当作 psql 命令执行","detailslink":"","legacyscore":"","newspost_id":3365},"fixes":[{"source_id":342,"source_version_id":31,"major":"18","fixed_minor":6,"raw":{"id":342,"patch_id":85,"version_id":31,"fixed_minor":6},"version_raw":{"id":31,"tree":18.0,"current":true,"docsgit":"","eoldate":"2030-11-14","reldate":"2026-08-13","testing":0,"supported":true,"docsloaded":"2026-09-27T00:10:45.258078+08:00","latestminor":6,"firstreldate":"2025-09-25"}},{"source_id":343,"source_version_id":30,"major":"17","fixed_minor":11,"raw":{"id":343,"patch_id":85,"version_id":30,"fixed_minor":11},"version_raw":{"id":30,"tree":17.0,"current":false,"docsgit":"","eoldate":"2029-11-08","reldate":"2026-08-13","testing":0,"supported":true,"docsloaded":"2026-09-27T00:10:45.258078+08:00","latestminor":11,"firstreldate":"2024-09-26"}},{"source_id":344,"source_version_id":29,"major":"16","fixed_minor":15,"raw":{"id":344,"patch_id":85,"version_id":29,"fixed_minor":15},"version_raw":{"id":29,"tree":16.0,"current":false,"docsgit":"","eoldate":"2028-11-09","reldate":"2026-08-13","testing":0,"supported":true,"docsloaded":"2026-09-27T00:10:45.258078+08:00","latestminor":15,"firstreldate":"2023-09-14"}},{"source_id":345,"source_version_id":28,"major":"15","fixed_minor":19,"raw":{"id":345,"patch_id":85,"version_id":28,"fixed_minor":19},"version_raw":{"id":28,"tree":15.0,"current":false,"docsgit":"","eoldate":"2027-11-11","reldate":"2026-08-13","testing":0,"supported":true,"docsloaded":"2026-09-27T00:10:45.258078+08:00","latestminor":19,"firstreldate":"2022-10-13"}},{"source_id":346,"source_version_id":27,"major":"14","fixed_minor":24,"raw":{"id":346,"patch_id":85,"version_id":27,"fixed_minor":24},"version_raw":{"id":27,"tree":14.0,"current":false,"docsgit":"","eoldate":"2026-11-12","reldate":"2026-08-13","testing":0,"supported":true,"docsloaded":"2026-09-27T00:10:45.258078+08:00","latestminor":24,"firstreldate":"2021-09-30"}}]}]}
