Vulnerability · Published May 8, 2025 · Assigned by PostgreSQL

CVE-2025-4207PostgreSQL GB18030 encoding validation can read one byte past end of allocation for text that fails validation

Medium 5.9

In plain English

A medium-severity security flaw in PostgreSQL. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.8% (higher than 55% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.9Medium
Exploit odds (30 days)0.8%top 44.6% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8pg_repack1.5.1-1.module_el8.10.0+3930+ecf33554ALSA-2025:14899
AlmaLinux:8pg_repack1.4.6-3.module_el8.6.0+3095+ee60d910ALSA-2025:15021
AlmaLinux:8pg_repack1.4.8-1.module_el8.9.0+3706+885c732eALSA-2025:15022
AlmaLinux:8pg_repack1.4.6-3.module_el8.6.0+2760+1746ec94ALSA-2025:15021
AlmaLinux:9pg_repack1.5.1-1.module_el9.6.0+146+c54fdecaALSA-2025:14827
AlmaLinux:9pg_repack1.4.8-2.module_el9.5.0+119+18833d03ALSA-2025:14862
AlmaLinux:8pgaudit16.0-1.module_el8.10.0+3798+606ebb9fALSA-2025:14899
AlmaLinux:8pgaudit1.5.0-1.module_el8.6.0+2760+1746ec94ALSA-2025:15021
AlmaLinux:8pgaudit1.7.0-1.module_el8.9.0+3706+885c732eALSA-2025:15022
AlmaLinux:8pgaudit1.5.0-1.module_el8.6.0+3095+ee60d910ALSA-2025:15021
AlmaLinux:9pgaudit16.0-1.module_el9.4.0+66+eb9878bcALSA-2025:14827
AlmaLinux:9pgaudit1.7.0-1.module_el9.3.0+52+21733919ALSA-2025:14862
AlmaLinux:9pgvector0.6.2-2.module_el9.6.0+167+4e561146ALSA-2025:14827
AlmaLinux:8postgres-decoderbufs2.4.0-1.Final.module_el8.10.0+3798+606ebb9fALSA-2025:14899
AlmaLinux:8postgres-decoderbufs0.10.0-2.module_el8.6.0+2760+1746ec94ALSA-2025:15021
AlmaLinux:8postgres-decoderbufs1.9.7-1.Final.module_el8.9.0+3706+885c732eALSA-2025:15022
AlmaLinux:8postgres-decoderbufs0.10.0-2.module_el8.6.0+3095+ee60d910ALSA-2025:15021
AlmaLinux:9postgres-decoderbufs1.9.7-1.Final.module_el9.3.0+52+21733919ALSA-2025:14862
AlmaLinux:9postgres-decoderbufs2.4.0-1.Final.module_el9.4.0+66+eb9878bcALSA-2025:14827
AlmaLinux:8postgresql13.22-1.module_el8.10.0+4042+cb252986ALSA-2025:15021
AlmaLinux:8postgresql15.14-1.module_el8.10.0+4041+afd30bb4ALSA-2025:15022
AlmaLinux:8postgresql16.10-1.module_el8.10.0+4038+0fbad93cALSA-2025:14899
AlmaLinux:9postgresql16.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14827
AlmaLinux:9postgresql15.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14862
AlmaLinux:8postgresql-contrib13.22-1.module_el8.10.0+4042+cb252986ALSA-2025:15021
AlmaLinux:8postgresql-contrib15.14-1.module_el8.10.0+4041+afd30bb4ALSA-2025:15022
AlmaLinux:8postgresql-contrib16.10-1.module_el8.10.0+4038+0fbad93cALSA-2025:14899
AlmaLinux:9postgresql-contrib15.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14862
AlmaLinux:9postgresql-contrib16.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14827
AlmaLinux:8postgresql-docs13.22-1.module_el8.10.0+4042+cb252986ALSA-2025:15021
AlmaLinux:8postgresql-docs15.14-1.module_el8.10.0+4041+afd30bb4ALSA-2025:15022
AlmaLinux:8postgresql-docs16.10-1.module_el8.10.0+4038+0fbad93cALSA-2025:14899
AlmaLinux:9postgresql-docs15.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14862
AlmaLinux:9postgresql-docs16.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14827
AlmaLinux:8postgresql-plperl15.14-1.module_el8.10.0+4041+afd30bb4ALSA-2025:15022
AlmaLinux:8postgresql-plperl13.22-1.module_el8.10.0+4042+cb252986ALSA-2025:15021
AlmaLinux:8postgresql-plperl16.10-1.module_el8.10.0+4038+0fbad93cALSA-2025:14899
AlmaLinux:9postgresql-plperl15.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14862
AlmaLinux:9postgresql-plperl16.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14827
AlmaLinux:8postgresql-plpython315.14-1.module_el8.10.0+4041+afd30bb4ALSA-2025:15022
AlmaLinux:8postgresql-plpython316.10-1.module_el8.10.0+4038+0fbad93cALSA-2025:14899
AlmaLinux:8postgresql-plpython313.22-1.module_el8.10.0+4042+cb252986ALSA-2025:15021
AlmaLinux:9postgresql-plpython316.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14827
AlmaLinux:9postgresql-plpython315.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14862
AlmaLinux:8postgresql-pltcl16.10-1.module_el8.10.0+4038+0fbad93cALSA-2025:14899
AlmaLinux:8postgresql-pltcl15.14-1.module_el8.10.0+4041+afd30bb4ALSA-2025:15022
AlmaLinux:8postgresql-pltcl13.22-1.module_el8.10.0+4042+cb252986ALSA-2025:15021
AlmaLinux:9postgresql-pltcl16.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14827
AlmaLinux:9postgresql-pltcl15.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14862
AlmaLinux:8postgresql-private-devel16.10-1.module_el8.10.0+4038+0fbad93cALSA-2025:14899
AlmaLinux:8postgresql-private-devel15.14-1.module_el8.10.0+4041+afd30bb4ALSA-2025:15022
AlmaLinux:9postgresql-private-devel16.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14827
AlmaLinux:9postgresql-private-devel15.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14862
AlmaLinux:8postgresql-private-libs16.10-1.module_el8.10.0+4038+0fbad93cALSA-2025:14899
AlmaLinux:8postgresql-private-libs15.14-1.module_el8.10.0+4041+afd30bb4ALSA-2025:15022
AlmaLinux:9postgresql-private-libs15.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14862
AlmaLinux:9postgresql-private-libs16.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14827
AlmaLinux:8postgresql-server15.14-1.module_el8.10.0+4041+afd30bb4ALSA-2025:15022
AlmaLinux:8postgresql-server16.10-1.module_el8.10.0+4038+0fbad93cALSA-2025:14899
AlmaLinux:8postgresql-server13.22-1.module_el8.10.0+4042+cb252986ALSA-2025:15021
AlmaLinux:9postgresql-server15.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14862
AlmaLinux:9postgresql-server16.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14827
AlmaLinux:8postgresql-server-devel13.22-1.module_el8.10.0+4042+cb252986ALSA-2025:15021
AlmaLinux:8postgresql-server-devel16.10-1.module_el8.10.0+4038+0fbad93cALSA-2025:14899
AlmaLinux:8postgresql-server-devel15.14-1.module_el8.10.0+4041+afd30bb4ALSA-2025:15022
AlmaLinux:9postgresql-server-devel16.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14827
AlmaLinux:9postgresql-server-devel15.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14862
AlmaLinux:8postgresql-static13.22-1.module_el8.10.0+4042+cb252986ALSA-2025:15021
AlmaLinux:8postgresql-static16.10-1.module_el8.10.0+4038+0fbad93cALSA-2025:14899
AlmaLinux:8postgresql-static15.14-1.module_el8.10.0+4041+afd30bb4ALSA-2025:15022
AlmaLinux:9postgresql-static15.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14862
AlmaLinux:9postgresql-static16.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14827
AlmaLinux:8postgresql-test16.10-1.module_el8.10.0+4038+0fbad93cALSA-2025:14899
AlmaLinux:8postgresql-test13.22-1.module_el8.10.0+4042+cb252986ALSA-2025:15021
AlmaLinux:8postgresql-test15.14-1.module_el8.10.0+4041+afd30bb4ALSA-2025:15022
AlmaLinux:9postgresql-test15.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14862
AlmaLinux:9postgresql-test16.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14827
AlmaLinux:10postgresql-test-rpm-macros16.10-1.el10_0ALSA-2025:14826
AlmaLinux:8postgresql-test-rpm-macros16.10-1.module_el8.10.0+4038+0fbad93cALSA-2025:14899
AlmaLinux:8postgresql-test-rpm-macros15.14-1.module_el8.10.0+4041+afd30bb4ALSA-2025:15022
AlmaLinux:8postgresql-test-rpm-macros13.22-1.module_el8.10.0+4042+cb252986ALSA-2025:15021
AlmaLinux:9postgresql-test-rpm-macros16.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14827
AlmaLinux:9postgresql-test-rpm-macros15.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14862
AlmaLinux:8postgresql-upgrade15.14-1.module_el8.10.0+4041+afd30bb4ALSA-2025:15022
AlmaLinux:8postgresql-upgrade16.10-1.module_el8.10.0+4038+0fbad93cALSA-2025:14899
AlmaLinux:8postgresql-upgrade13.22-1.module_el8.10.0+4042+cb252986ALSA-2025:15021
AlmaLinux:9postgresql-upgrade16.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14827
AlmaLinux:9postgresql-upgrade15.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14862
AlmaLinux:8postgresql-upgrade-devel13.22-1.module_el8.10.0+4042+cb252986ALSA-2025:15021
AlmaLinux:8postgresql-upgrade-devel15.14-1.module_el8.10.0+4041+afd30bb4ALSA-2025:15022
AlmaLinux:8postgresql-upgrade-devel16.10-1.module_el8.10.0+4038+0fbad93cALSA-2025:14899
AlmaLinux:9postgresql-upgrade-devel15.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14862
AlmaLinux:9postgresql-upgrade-devel16.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14827
Alpine:v3.20postgresql1515.13-r0ALPINE-CVE-2025-4207
Alpine:v3.21postgresql1515.13-r0ALPINE-CVE-2025-4207
Alpine:v3.22postgresql1515.13-r0ALPINE-CVE-2025-4207
Alpine:v3.20postgresql1616.9-r0ALPINE-CVE-2025-4207
Alpine:v3.21postgresql1616.9-r0ALPINE-CVE-2025-4207
Alpine:v3.22postgresql1616.9-r0ALPINE-CVE-2025-4207
Alpine:v3.23postgresql1616.9-r0ALPINE-CVE-2025-4207
Alpine:v3.24postgresql1616.9-r0ALPINE-CVE-2025-4207
Alpine:v3.21postgresql1717.5-r0ALPINE-CVE-2025-4207
Alpine:v3.22postgresql1717.5-r0ALPINE-CVE-2025-4207
Alpine:v3.23postgresql1717.5-r0ALPINE-CVE-2025-4207
Alpine:v3.24postgresql1717.5-r0ALPINE-CVE-2025-4207
Debian:12postgresql-1515.13-0+deb12u1DEBIAN-CVE-2025-4207
Debian:13postgresql-1717.5-1DEBIAN-CVE-2025-4207
Ubuntu:22.04:LTSpostgresql-1414.18-0ubuntu0.22.04.1USN-7520-1
Ubuntu:22.04:LTSpostgresql-1414.18-0ubuntu0.22.04.1UBUNTU-CVE-2025-4207
Ubuntu:24.04:LTSpostgresql-1616.9-0ubuntu0.24.04.1UBUNTU-CVE-2025-4207
Ubuntu:24.04:LTSpostgresql-1616.9-0ubuntu0.24.04.1USN-7520-1

Affected products (as reported)

VendorProductVersions
n/a PostgreSQL 17 – before 17.516 – before 16.915 – before 15.1314 – before 14.180 – before 13.21

Weakness: CWE-126 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

References