CVE-2025-4207 PostgreSQL GB18030 encoding validation can read one byte past end of allocation for text that fails validation
A buffer over-read in PostgreSQL's GB18030 encoding validation can cause a denial of service by terminating the process.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-4207?
CVE-2025-4207 is a medium-severity denial of service vulnerability in PostgreSQL, published on 8 May 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
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.
Weakness: CWE-126
Which versions are affected by CVE-2025-4207?
1 open source package ship an affected version, including postgresql.
| Package | Affected | Fixed in |
|---|---|---|
postgresql Bitnami | All versions | 13.21.0, 14.18.0, 15.13.0, 16.9.0, 17.5.0 |
Linux distribution packages (39)
postgresql13 SUSE:Enterprise Storage 7.1 | All versions | 13.21-150200.5.72.1 |
postgresql14 SUSE:Enterprise Storage 7.1 | All versions | 14.18-150200.5.58.1 |
postgresql15 SUSE:Enterprise Storage 7.1 | All versions | 15.13-150200.5.41.1 |
postgresql16 SUSE:Enterprise Storage 7.1 | All versions | 16.9-150200.5.29.1 |
postgresql17 SUSE:Enterprise Storage 7.1 | All versions | 17.5-150200.5.13.1 |
postgresql13 SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 13.21-150200.5.72.1 |
postgresql14 SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 14.18-150200.5.58.1 |
postgresql15 SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 15.13-150200.5.41.1 |
postgresql16 SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 16.9-150200.5.29.1 |
postgresql17 SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 17.5-150200.5.13.1 |
postgresql13 SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 13.21-150200.5.72.1 |
postgresql14 SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 14.18-150200.5.58.1 |
postgresql15 SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 15.13-150200.5.41.1 |
postgresql16 SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 16.9-150200.5.29.1 |
postgresql17 SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 17.5-150200.5.13.1 |
postgresql13 SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 13.21-150200.5.72.1 |
postgresql14 SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 14.18-150200.5.58.1 |
postgresql15 SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 15.13-150200.5.41.1 |
postgresql16 SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 16.9-150200.5.29.1 |
postgresql17 SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 17.5-150200.5.13.1 |
postgresql15 SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | All versions | 15.13-150200.5.41.1 |
postgresql16 SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | All versions | 16.9-150200.5.29.1 |
postgresql17 SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | All versions | 17.5-150200.5.13.1 |
postgresql15 SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS | All versions | 15.13-150200.5.41.1 |
postgresql16 SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS | All versions | 16.9-150200.5.29.1 |
postgresql17 SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS | All versions | 17.5-150200.5.13.1 |
postgresql16 SUSE:Linux Enterprise Module for Basesystem 15 SP6 | All versions | 16.9-150600.16.18.1 |
postgresql17 SUSE:Linux Enterprise Module for Basesystem 15 SP6 | All versions | 17.5-150600.13.13.1 |
postgresql17 SUSE:Linux Enterprise Module for Basesystem 15 SP7 | All versions | 17.5-150600.13.13.1 |
postgresql14 SUSE:Linux Enterprise Module for Legacy 15 SP6 | All versions | 14.18-150600.16.17.1 |
postgresql15 SUSE:Linux Enterprise Module for Legacy 15 SP6 | All versions | 15.13-150600.16.17.1 |
postgresql15 SUSE:Linux Enterprise Module for Legacy 15 SP7 | All versions | 15.13-150600.16.17.1 |
postgresql16 SUSE:Linux Enterprise Module for Legacy 15 SP7 | All versions | 16.9-150600.16.18.1 |
postgresql14 SUSE:Linux Enterprise Module for Package Hub 15 SP3 | All versions | 14.18-150200.5.58.1 |
postgresql14 SUSE:Linux Enterprise Module for Package Hub 15 SP4 | All versions | 14.18-150200.5.58.1 |
postgresql16 SUSE:Linux Enterprise Module for Package Hub 15 SP4 | All versions | 16.9-150200.5.29.1 |
postgresql14 SUSE:Linux Enterprise Module for Package Hub 15 SP5 | All versions | 14.18-150200.5.58.1 |
postgresql16 SUSE:Linux Enterprise Module for Package Hub 15 SP5 | All versions | 16.9-150200.5.29.1 |
postgresql17 SUSE:Linux Enterprise Module for Package Hub 15 SP5 | All versions | 17.5-150200.5.13.1 |
How do I fix CVE-2025-4207?
Upgrade postgresql to a fixed version for your release line: 13.21.0, 14.18.0, 15.13.0 or 16.9.0.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2025-4207 being exploited?
There is no known exploitation of CVE-2025-4207 in the wild and no public exploit code.
Sources
Also known as ALPINE-CVE-2025-4207, AZL-61736, AZL-61739, AZL-74894, BELL-CVE-2025-4207, BIT-postgresql-2025-4207 and 51 more.