English

Tất cả lỗ hổng

PostgreSQL 18.7, 17.12, 16.16, 15.20, 14.25: lỗ hổng trong một bản cập nhật nhỏ

52 lỗ hổng được vá trong cùng một lần; 32 lỗi trong số đó cho phép chạy mã bằng user hệ điều hành của máy chủ, từ một role đã đăng nhập bất kỳ — nên một lỗ SQL injection trong ứng dụng web là đủ để chạm tới.

Phát hành 12/11/2026 · Postgres 18–14 · postgresql.org/about/news/postgresql-187-1712-1616-1520-1425-and-19-rc-2-released-3442/

Đọc từ postgresql.org ngày 13/11/2026. Trang này đọc đúng một bản phát hành. PostgreSQL chưa phải sản phẩm được kiểm tra từng phiên bản trên trang này: không có danh sách theo nhánh, không có ô kiểm tra phiên bản, và rasoat host chỉ thấy gói của bản phân phối — không thấy image container.

Chuyện gì xảy ra

52 lỗ hổng trong một bản cập nhật nhỏ — con số lớn bất thường với PostgreSQL, vốn thường vá vài lỗi mỗi lần.

43 lỗi nằm trong lõi, 6 ở công cụ client (pg_dump, pg_restore, pg_basebackup, reindexdb, vacuumdb) và 3 ở extension đóng gói kèm (plperl, pltcl, dblink, dict_int).

40 lỗi chạm tới cả năm nhánh; số còn lại chỉ chạm những nhánh đã có tính năng liên quan, nên đừng đọc con số 52 như nhau cho mọi nhánh.

32 lỗi có CVSS 8.8: cần một role đã đăng nhập, nhưng role nào cũng được, và kết quả là chạy mã bằng user hệ điều hành của tiến trình.

Chỉ 1 lỗi không cần đăng nhập, và lỗi đó chỉ ảnh hưởng tính sẵn sàng.

PostgreSQL 14 nhận bản cuối cùng trong đợt này và hết hỗ trợ: sau đó không còn bản vá bảo mật nào cho nhánh đó.

Đường vào

  • Một role bất kỳ, không cần superuser. Ứng dụng web kết nối bằng role riêng của nó; một lỗ SQL injection ở ứng dụng là đủ để chạm tới các lỗi này.
  • Cổng 5432 không mở ra internet không làm mất rủi ro. Kẻ tấn công đi qua ứng dụng, không đi qua cổng.
  • Công cụ client cũng là bề mặt: pg_restore trên một archive không phải do bạn tạo, pg_dump định dạng tar rồi đưa cho psql, pg_basebackup đọc manifest — nên cron backup và docker exec cũng nằm trong phạm vi.
  • Extension: chỉ khi đã cài plperl, pltcl, dblink hoặc dict_int.
  • PostgreSQL 14: đã hết hỗ trợ, nên sau bản này không còn bản vá — với nhánh đó, câu trả lời là nâng major, không phải nâng minor.

Bản nào đang chạy

  • Docker và Compose: thẻ image chính là phiên bản. postgres:16 kéo về hôm deploy vẫn là bản minor của hôm đó; thẻ trôi chỉ có tác dụng sau docker compose pull rồi up -d.
  • Gói của bản phân phối: postgresql-16 từ kho; vá bằng apt, rồi khởi động lại cluster.
  • Dịch vụ quản lý (RDS, Cloud SQL, Supabase, Neon): nhà cung cấp vá theo lịch của họ; SELECT version() cho biết bản thật đang chạy.
  • Tự biên dịch hoặc image tự dựng: không có ai vá hộ.

Đang chạy, không phải đã cài

  • apt upgrade thay tệp trên đĩa; postmaster vẫn giữ binary cũ trong bộ nhớ tới khi khởi động lại. SELECT version() trả lời câu hỏi “đang chạy bản nào”; dpkg -l postgresql-16 thì không.
  • Với container, pull chỉ tải image; up -d mới tạo tiến trình mới. docker ps vẫn hiện image cũ nếu bạn chỉ pull.

Bản vá cho từng nhánh

NhánhBản váTrạng thái
1818.7Còn hỗ trợ
1717.12Còn hỗ trợ
1616.16Còn hỗ trợ
1515.20Còn hỗ trợ
1414.25Hết hỗ trợ 12/11/2026

Sau khi nâng cấp, không chỉ nâng cấp

Thay binary là đủ để vá, nhưng đợt này còn việc phải làm trên dữ liệu. Nguyên văn mục Updating của thông báo phát hành, để bạn đối chiếu:

All PostgreSQL update releases are cumulative. As with other minor releases, users are not required to dump and reload their database or use pg_upgrade in order to apply this update release; you may simply stop PostgreSQL and update its binaries.

If you suspect that a GIN index is affected by one of the corruption issues fixed in this release, you should reindex it, for example:

REINDEX INDEX your_index_name;

If you use pg_trgm, you should reindex any GiST indexes that use the gist_trgm_ops operator class.

If you see missing chunk number errors when reading a table, you should reindex the table, which also reindexes its TOAST table, for example:

REINDEX TABLE your_table_name;

If you use incremental backups, we recommend taking a new full backup after updating and using it as the basis for subsequent incremental backups.

If you use partitioned tables, the following query finds NOT NULL NO INHERIT constraints on partitioned tables:

SELECT conrelid::regclass, conname
FROM pg_constraint
WHERE contype = 'n' AND connoinherit
AND conrelid IN (SELECT oid FROM pg_class WHERE relkind = 'p');

You can remove unwanted constraints with ALTER TABLE ... DROP CONSTRAINT .... Constraints you want to keep should be repaired with ALTER TABLE ... ALTER CONSTRAINT ... INHERIT, which will fail if any of the table's partitions contain NULL values in that column.

If you have B-tree indexes on bpchar columns (that is, columns declared as bpchar without a length), you should reindex them after updating. Columns declared as char(n) are not affected.

Users who have skipped one or more update releases may need to run additional post-update steps; please see the release notes from earlier versions for details.

For more details, please see the release notes .

Nếu dùng pg_trgm cho tìm kiếm, bước REINDEX GiST là bước dễ bị bỏ sót nhất: tìm kiếm vẫn chạy nhưng trả thiếu dòng.

Danh sách 52 lỗ hổng

Mô tả và điểm CVSS giữ nguyên tiếng Anh từ trang CVE của postgresql.org; mỗi dòng dẫn về trang đó.

CVSSCVETóm tắtThành phần
8.8CVE-2026-116304Parallel RECORD typmod use-after-free executes arbitrary codelõi
8.8CVE-2026-116306Composite-type change during field assignment executes arbitrary codelõi
8.8CVE-2026-116307plperl prepared-query use-after-free executes arbitrary codelõi
8.8CVE-2026-116309plperl blessed-reference type confusion may execute arbitrary codelõi
8.8CVE-2026-116314pg_restore executes arbitrary code due to missing non-plain archive validationclient
8.8CVE-2026-116315tsvector_delete() heap buffer overflow executes arbitrary codelõi
8.8CVE-2026-116316Security-restricted operations can create types in pg_temp, which later queries of the session findlõi
8.8CVE-2026-116317ts_rank_cd() heap buffer overflow may execute arbitrary codelõi
8.8CVE-2026-116318pg_dump not-null constraint name allows SQL injectionclient
8.8CVE-2026-116319plperl reentrant return_next() use-after-free executes arbitrary codelõi
8.8CVE-2026-116320plperl array and hash conversion use-after-free executes arbitrary codelõi
8.8CVE-2026-116323pltcl reentrant result conversion use-after-free executes arbitrary codelõi
8.8CVE-2026-116326plperl tied-object exceptions follow stale sigjmp_buflõi
8.8CVE-2026-116328Generation memory context integer wraparound executes arbitrary codelõi
8.8CVE-2026-116329Statistics import type confusion executes arbitrary codelõi
8.8CVE-2026-116330pg_dump tar restore.sql fails to block psql command injectionclient
8.8CVE-2026-116331Min/max aggregate type confusion executes arbitrary codelõi
8.8CVE-2026-116332Portal setup use-after-free executes arbitrary codelõi
8.8CVE-2026-116335Commutator or negator result-type confusion executes arbitrary codelõi
8.8CVE-2026-116336REINDEX CONCURRENTLY does not block DROP INDEX during index functionslõi
8.8CVE-2026-120139Tuple-size integer wraparound executes arbitrary codelõi
8.8CVE-2026-120141Materialized set-returning function type confusion executes arbitrary codelõi
8.8CVE-2026-120142Dropped-column type confusion executes arbitrary codelõi
8.8CVE-2026-120143Transition-table cursor use-after-free executes arbitrary codelõi
8.8CVE-2026-120144Type-cache invalidation gap executes arbitrary codelõi
8.8CVE-2026-120145Logical replication can write to subscriber system catalogs, executing arbitrary codelõi
8.8CVE-2026-120147dblink reentrant disconnect use-after-free executes arbitrary codeextension
8.8CVE-2026-120149FDW batch-insert mismatch executes arbitrary codelõi
8.8CVE-2026-120150Expanded-record domain-check use-after-free executes arbitrary codelõi
8.8CVE-2026-120151plpgsql record-field type confusion executes arbitrary codelõi
8.8CVE-2026-18447Output parameter type confusion executes arbitrary codelõi
8.8CVE-2026-6460Type confusion after ALTER ... SET DATA TYPE executes arbitrary codelõi
8.1CVE-2026-120148Extended-statistics pseudo-type confusion executes arbitrary codelõi
8.1CVE-2026-14661dblink and subscriptions can append to arbitrary filesextension
8CVE-2026-116325reindexdb index name quoting allows SQL injectionclient
7.2CVE-2026-116313vacuumdb --missing-stats-only lets a database owner execute code as the vacuumdb userclient
7.2CVE-2026-120153Extension-script substitutions allow SQL injection through object nameslõi
7.2CVE-2026-6467Extension script schema mishandling executes arbitrary SQLlõi
6.5CVE-2026-116333Parallel B-tree array scan reads beyond array boundslõi
5.4CVE-2026-116311DROP OWNED can remove restrictive row security policies from non-owned tableslõi
5.4CVE-2026-116312MERGE can place the wrong row in a trigger transition tablelõi
5.4CVE-2026-16237INSERT ... ON CONFLICT can read or modify rows despite auto-updatable view WHERE conditionlõi
5.3CVE-2026-116322Pre-authentication cancel request can leak a spinlocklõi
4.3CVE-2026-116308dict_int reads beyond zero-length tokensextension
4.3CVE-2026-116310COPY error context uses freed field storagelõi
4.3CVE-2026-116321Unterminated name value discloses server memorylõi
4.3CVE-2026-116327security_barrier analysis can expose hidden values through indirect expressionslõi
4.3CVE-2026-120146REASSIGN OWNED bypasses role SET and CREATEDB checkslõi
4.3CVE-2026-120152pg_show_all_settings() use-after-free discloses memorylõi
4.3CVE-2026-120154INSERT ... ON CONFLICT can read rows despite row security policieslõi
3.7CVE-2026-16240pg_basebackup can use backup manifest content as a format stringclient
3.1CVE-2026-116303Foreign key and JSON conversions bypass EXECUTE privilege on cast functionslõi

Cách xử lý

  • Nâng đúng nhánh đang chạy lên bản vá của nhánh đó — bảng ở trên. Bản cập nhật nhỏ không cần dump và reload.
  • PostgreSQL 14: nâng major (pg_upgrade, hoặc dump rồi restore) sang nhánh còn hỗ trợ. Bản cuối của nhánh 14 không phải là bản vá.
  • Container: docker compose pull rồi up -d, sau đó kiểm tra SELECT version() bên trong container.
  • Dịch vụ quản lý: đọc bản đang chạy; nếu nhà cung cấp chưa vá thì bên bạn không có cách vá, chỉ còn giảm thiểu ở tầng ứng dụng.

Tự kiểm tra

psql -c 'SELECT version();'

Cho biết: bản đang chạy thật, không phải bản đã cài

psql -c 'SHOW server_version;'

Cho biết: số phiên bản server trả lời

psql -c 'SELECT pg_postmaster_start_time();'

Cho biết: thời điểm postmaster khởi động: trước lúc nâng gói nghĩa là chưa nạp binary mới

docker exec <container> psql -U postgres -c 'SELECT version();'

Cho biết: bản trong container, không phải trên máy chủ

apt list --installed 'postgresql-*'

Cho biết: gói đã cài trên Debian/Ubuntu — chỉ là nửa câu trả lời

psql -c '\dx'

Cho biết: extension đã cài: plperl, pltcl, dblink, dict_int nằm trong nhóm lỗi này

Nguồn

Viết từ thông báo phát hành và trang CVE của postgresql.org; dữ liệu đọc ngày 13/11/2026. Khi có khác biệt, postgresql.org là chuẩn.