Vulnerability · CVE-2025-4207
Buffer over-read in PostgreSQL GB18030 encoding validation allows a database input provider to achieve temporary denial of service on platforms where a 1-byte over-read can elicit
Published May 8, 2025 · catalog updated May 9, 2025 · PostgreSQL
Check if you run it
No confirmed exploitation is on record for CVE-2025-4207. EPSS is 0.76%. Act only if a listed version of PostgreSQL is installed.
Gaps on this record
- No vendor fix or required action is stored. Compare the linked advisory before you change production.
- Severity
- Medium5.9
- Known exploitation
- Not in CISA/VulnCheck KEV
- EPSS
- 0.76%
- Remediation
- Fix linked
- Affected products
- vendor n/a PostgreSQL 0 <13.21
Buffer over-read in PostgreSQL GB18030 encoding validation allows a database input provider to achieve temporary denial of service on platforms where a 1-byte over-read can elicit process termination. This affects the database server and also libpq. Versions before PostgreSQL 17.5, 16.9, 15.13, 14.18, and 13.21 are affected.
Are you affected?
Enter the version you run. The result uses only the ranges stored on this record.
The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.
- vendor n/a PostgreSQL 0 <13.210 <13.21
How to fix CVE-2025-4207
Recommended remediation
2 related fix commits linked. Confirm the fix covers your edition and version.
Official advisories
What to do
Three questions, each answered from this record only. Confirm the vendor advisory before you patch.
Should you patch?
No confirmed exploitation is on record for CVE-2025-4207. EPSS is 0.76%. Act only if a listed version of PostgreSQL is installed.
Which versions are affected?
Compare what you have installed with n/a PostgreSQL 0 <13.21 0 <13.21. Compare the installed version with the linked vendor advisory before you change production.
What should an analyst verify?
No weakness class is stored. EPSS 0.76%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.
Technology hubs
Code
The project this record applies to. Exploit listings stay in References.
No public source repository is identified for this product.
Related Odoo Git fixes
Quoted Community commit messages that cite this CVE. Presence of a commit is not proof that every edition or backport includes the fix. Enterprise proprietary diffs are never shown here. Timeline
May 5, 2025 · referenced
Refactor test_escape.c for additional ways of testing.
Refactor test_escape.c for additional ways of testing. Start the file with static functions not specific to pe_test_vectors tests. This way, new tests can use them without disrupting the file's layout. Change report_result() PQExpBuffer arguments to plain strings. Back-patch to v13 (all supported versions), for the next commit. Reviewed-by: Masahiko Sawada Backpatch-through: 13 Security: CVE-2025-4207
https://github.com/postgres/postgres/commit/5be213caaa1a9a65dfdbbf400b6a53b5e743b8d1May 5, 2025 · referenced
With GB18030, prevent SIGSEGV from reading past end of allocation.
With GB18030, prevent SIGSEGV from reading past end of allocation. With GB18030 as source encoding, applications could crash the server via SQL functions convert() or convert_from(). Applications themselves could crash after passing unterminated GB18030 input to libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeStringConn(), or PQescapeString(). Extension code could crash by passing unterminated GB18030 input to jsonapi.h functions. All those functions have been intended to handle untrusted, unterminated input safely. A crash required allocating the input such that the last byte of the allocation was the last byte of a virtual memory page. Some malloc() implementations take measures against that, making the SIGSEGV hard to reach. Back-patch to v13 (all supported versions). Author: Noah Misch Author: Andres Freund Reviewed-by: Masahiko Sawada Backpatch-through: 13 Secur…
https://github.com/postgres/postgres/commit/627acc3caa74caa736b2c5587e944d2ea510ea67
Timeline
Detection, updates, and resolution for this record.
May 8, 2025 · EUVD
Detected
Buffer over-read in PostgreSQL GB18030 encoding validation allows a database input provider to achieve temporary denial of service on platforms where a 1-byte over-read can elicit process termination. This affects the database server and also libpq. Versions before PostgreSQL 17.5, 16.9, 15.13, 14.18, and 13.21 are affected.
May 9, 2025 · EUVD
Updated
Buffer over-read in PostgreSQL GB18030 encoding validation allows a database input provider to achieve temporary denial of service on platforms where a 1-byte over-read can elicit process termination. This affects the database server and also libpq. Versions before PostgreSQL 17.5, 16.9, 15.13, 14.18, and 13.21 are affected.
Sources
- CVE.orgVulnerability recordCVE-2025-4207
Official CVE identifier
cve.org - FIRST EPSSExploitation probabilityCVE-2025-4207
30-day exploitation probability 0.8%
first.org - EUVDVulnerability recordEUVD-2025-14007
Buffer over-read in PostgreSQL GB18030 encoding validation allows a database input provider to achieve temporary denial of service on platforms where a 1-byte over-read can elicit process termination. This affects the database server and also libpq. Versions before PostgreSQL 17.
euvd.enisa.europa.eu
References
Freshness
Last verified in this catalog Oct 18, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.