CVEfocus › CVE database › CVE-2025-4207

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

CVSS 5.9 MediumEPSS 0.9% (higher than 56% of CVEs)Published 2025-05-08Updated 2025-05-09Assigner: PostgreSQL

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.

CWE-126

What to do

Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Ubuntu: see the table below for the fixed version per release.

Red Hat, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

112Fixed
21Fix pending
10Will not fix
1Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 25.10postgresql-17Not affected
vulnerable_code_not_present
Ubuntu 24.04postgresql-16Fixed16.9-0ubuntu0.24.04.1UBUNTU-CVE-2025-4207
Ubuntu 22.04postgresql-14Fixed14.18-0ubuntu0.22.04.1UBUNTU-CVE-2025-4207
Ubuntu 20.04postgresql-12Fixed12.22-0ubuntu0.20.04.4UBUNTU-CVE-2025-4207
Ubuntu 18.04postgresql-10Fix pendingUBUNTU-CVE-2025-4207
Ubuntu 16.04postgresql-9.5Fix pendingUBUNTU-CVE-2025-4207
Ubuntu 14.04postgresql-9.3Fix pendingUBUNTU-CVE-2025-4207
Debian 13postgresql-17Fixed17.5-1DEBIAN-CVE-2025-4207
Debian 12postgresql-15Fixed15.13-0+deb12u1DEBIAN-CVE-2025-4207
Red Hat Enterprise Linux 10libpqFix pending
Fix deferred
Red Hat Enterprise Linux 10libpq-develFix pending
Fix deferred
Red Hat Enterprise Linux 10postgresqlFixed0:16.10-1.el10_0RHSA-2025:14826
Red Hat Enterprise Linux 10postgresql-contribFixed0:16.10-1.el10_0RHSA-2025:14826
Red Hat Enterprise Linux 10postgresql-docsFixed0:16.10-1.el10_0RHSA-2025:14826
Red Hat Enterprise Linux 10postgresql-plperlFixed0:16.10-1.el10_0RHSA-2025:14826
Red Hat Enterprise Linux 10postgresql-plpython3Fixed0:16.10-1.el10_0RHSA-2025:14826
Red Hat Enterprise Linux 10postgresql-pltclFixed0:16.10-1.el10_0RHSA-2025:14826
Red Hat Enterprise Linux 10postgresql-private-develFixed0:16.10-1.el10_0RHSA-2025:14826
Red Hat Enterprise Linux 10postgresql-private-libsFixed0:16.10-1.el10_0RHSA-2025:14826
Red Hat Enterprise Linux 10postgresql-serverFixed0:16.10-1.el10_0RHSA-2025:14826
Red Hat Enterprise Linux 10postgresql-server-develFixed0:16.10-1.el10_0RHSA-2025:14826
Red Hat Enterprise Linux 10postgresql-staticFixed0:16.10-1.el10_0RHSA-2025:14826
Red Hat Enterprise Linux 10postgresql-testFixed0:16.10-1.el10_0RHSA-2025:14826
Red Hat Enterprise Linux 10postgresql-test-rpm-macrosFixed0:16.10-1.el10_0RHSA-2025:14826
Red Hat Enterprise Linux 10postgresql-upgradeFixed0:16.10-1.el10_0RHSA-2025:14826
Red Hat Enterprise Linux 10postgresql-upgrade-develFixed0:16.10-1.el10_0RHSA-2025:14826
Red Hat Enterprise Linux 10postgresql16Fixed0:16.10-1.el10_0RHSA-2025:14826
Red Hat Enterprise Linux 9libpqFix pending
Fix deferred
Red Hat Enterprise Linux 9libpq-develFix pending
Fix deferred
Red Hat Enterprise Linux 9pg_repackFixed0:1.5.1-1.module+el9.6.0+22880+6b241eecRHSA-2025:14862
Red Hat Enterprise Linux 9pgauditFixed0:1.7.0-1.module+el9.2.0+17405+aeb9ec60RHSA-2025:14827
Red Hat Enterprise Linux 9pgvectorFixed0:0.6.2-2.module+el9.6.0+22979+c3d78d52RHSA-2025:14827
Red Hat Enterprise Linux 9postgres-decoderbufsFixed0:1.9.7-1.Final.module+el9.2.0+17405+aeb9ec60RHSA-2025:14827
Red Hat Enterprise Linux 9postgresqlFixed
Fix deferred
0:15.14-1.module+el9.6.0+23419+7863ab62RHSA-2025:14827
Red Hat Enterprise Linux 9postgresql-contribFixed
Fix deferred
0:16.10-1.module+el9.6.0+23420+848a4539RHSA-2025:14862
Red Hat Enterprise Linux 9postgresql-docsFixed
Fix deferred
0:16.10-1.module+el9.6.0+23420+848a4539RHSA-2025:14862
Red Hat Enterprise Linux 9postgresql-plperlFixed
Fix deferred
0:16.10-1.module+el9.6.0+23420+848a4539RHSA-2025:14862
Red Hat Enterprise Linux 9postgresql-plpython3Fixed
Fix deferred
0:15.14-1.module+el9.6.0+23419+7863ab62RHSA-2025:14827
Red Hat Enterprise Linux 9postgresql-pltclFixed
Fix deferred
0:15.14-1.module+el9.6.0+23419+7863ab62RHSA-2025:14827
Red Hat Enterprise Linux 9postgresql-private-develFixed
Fix deferred
0:15.14-1.module+el9.6.0+23419+7863ab62RHSA-2025:14827
Red Hat Enterprise Linux 9postgresql-private-libsFixed
Fix deferred
0:15.14-1.module+el9.6.0+23419+7863ab62RHSA-2025:14827
Red Hat Enterprise Linux 9postgresql-serverFixed
Fix deferred
0:15.14-1.module+el9.6.0+23419+7863ab62RHSA-2025:14827
Red Hat Enterprise Linux 9postgresql-server-develFixed
Fix deferred
0:16.10-1.module+el9.6.0+23420+848a4539RHSA-2025:14862
Red Hat Enterprise Linux 9postgresql-staticFixed
Fix deferred
0:15.14-1.module+el9.6.0+23419+7863ab62RHSA-2025:14827
Red Hat Enterprise Linux 9postgresql-testFixed
Fix deferred
0:15.14-1.module+el9.6.0+23419+7863ab62RHSA-2025:14827
Red Hat Enterprise Linux 9postgresql-test-rpm-macrosFixed
Fix deferred
0:15.14-1.module+el9.6.0+23419+7863ab62RHSA-2025:14827
Red Hat Enterprise Linux 9postgresql-upgradeFixed
Fix deferred
0:15.14-1.module+el9.6.0+23419+7863ab62RHSA-2025:14827
Red Hat Enterprise Linux 9postgresql-upgrade-develFixed
Fix deferred
0:15.14-1.module+el9.6.0+23419+7863ab62RHSA-2025:14827
Red Hat Enterprise Linux 8libpqFix pending
Fix deferred
Red Hat Enterprise Linux 8libpq-develFix pending
Fix deferred
Red Hat Enterprise Linux 8pg_repackFixed
Fix deferred
0:1.5.1-1.module+el8.10.0+22551+c0330dc9RHSA-2025:15022
Red Hat Enterprise Linux 8pgauditFixed
Fix deferred
0:1.5.0-1.module+el8.9.0+20664+9c30cf7fRHSA-2025:15022
Red Hat Enterprise Linux 8postgres-decoderbufsFixed
Fix deferred
0:0.10.0-2.module+el8.9.0+20664+9c30cf7fRHSA-2025:15022
Red Hat Enterprise Linux 8postgresqlFixed
Fix deferred
0:13.22-1.module+el8.10.0+23422+b659575fRHSA-2025:14899
Red Hat Enterprise Linux 8postgresql-contribFixed
Fix deferred
0:15.14-1.module+el8.10.0+23423+5a199198RHSA-2025:15021
Red Hat Enterprise Linux 8postgresql-docsFixed
Fix deferred
0:16.10-1.module+el8.10.0+23424+e26efc6cRHSA-2025:15022
Red Hat Enterprise Linux 8postgresql-plperlFixed
Fix deferred
0:15.14-1.module+el8.10.0+23423+5a199198RHSA-2025:14899
Red Hat Enterprise Linux 8postgresql-plpython3Fixed
Fix deferred
0:13.22-1.module+el8.10.0+23422+b659575fRHSA-2025:14899
Red Hat Enterprise Linux 8postgresql-pltclFixed
Fix deferred
0:16.10-1.module+el8.10.0+23424+e26efc6cRHSA-2025:15022
Red Hat Enterprise Linux 8postgresql-private-develFixed
Fix deferred
0:16.10-1.module+el8.10.0+23424+e26efc6cRHSA-2025:15022
Red Hat Enterprise Linux 8postgresql-private-libsFixed
Fix deferred
0:16.10-1.module+el8.10.0+23424+e26efc6cRHSA-2025:15022
Red Hat Enterprise Linux 8postgresql-serverFixed
Fix deferred
0:15.14-1.module+el8.10.0+23423+5a199198RHSA-2025:15021
Red Hat Enterprise Linux 8postgresql-server-develFixed
Fix deferred
0:15.14-1.module+el8.10.0+23423+5a199198RHSA-2025:15021
Red Hat Enterprise Linux 8postgresql-staticFixed
Fix deferred
0:16.10-1.module+el8.10.0+23424+e26efc6cRHSA-2025:15022
Red Hat Enterprise Linux 8postgresql-testFixed
Fix deferred
0:15.14-1.module+el8.10.0+23423+5a199198RHSA-2025:14899
Red Hat Enterprise Linux 8postgresql-test-rpm-macrosFixed
Fix deferred
0:13.22-1.module+el8.10.0+23422+b659575fRHSA-2025:15022
Red Hat Enterprise Linux 8postgresql-upgradeFixed
Fix deferred
0:15.14-1.module+el8.10.0+23423+5a199198RHSA-2025:15021
Red Hat Enterprise Linux 8postgresql-upgrade-develFixed
Fix deferred
0:15.14-1.module+el8.10.0+23423+5a199198RHSA-2025:14899
Red Hat Enterprise Linux 7postgresqlFix pending
Fix deferred
Red Hat Enterprise Linux 7postgresql-contribFix pending
Fix deferred
Red Hat Enterprise Linux 7postgresql-develFix pending
Fix deferred
Red Hat Enterprise Linux 7postgresql-docsFix pending
Fix deferred
Red Hat Enterprise Linux 7postgresql-libsFix pending
Fix deferred
Red Hat Enterprise Linux 7postgresql-plperlFix pending
Fix deferred
Red Hat Enterprise Linux 7postgresql-plpythonFix pending
Fix deferred
Red Hat Enterprise Linux 7postgresql-pltclFix pending
Fix deferred
Red Hat Enterprise Linux 7postgresql-serverFix pending
Fix deferred
Red Hat Enterprise Linux 7postgresql-staticFix pending
Fix deferred
Red Hat Enterprise Linux 7postgresql-testFix pending
Fix deferred
Red Hat Enterprise Linux 7postgresql-upgradeFix pending
Fix deferred
Red Hat Enterprise Linux 6postgresqlWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-contribWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-develWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-docsWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-libsWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-plperlWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-plpythonWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-pltclWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-serverWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-testWill not fix
Out of support scope
AlmaLinux 10postgresql-test-rpm-macrosFixed16.10-1.el10_0ALSA-2025:14826
AlmaLinux 9pg_repackFixed1.4.8-2.module_el9.5.0+119+18833d03ALSA-2025:14827
AlmaLinux 9pgauditFixed1.7.0-1.module_el9.3.0+52+21733919ALSA-2025:14827
AlmaLinux 9pgvectorFixed0.6.2-2.module_el9.6.0+167+4e561146ALSA-2025:14827
AlmaLinux 9postgres-decoderbufsFixed2.4.0-1.Final.module_el9.4.0+66+eb9878bcALSA-2025:14862
AlmaLinux 9postgresqlFixed15.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14827
AlmaLinux 9postgresql-contribFixed16.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14862
AlmaLinux 9postgresql-docsFixed15.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14827
AlmaLinux 9postgresql-plperlFixed15.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14827
AlmaLinux 9postgresql-plpython3Fixed16.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14862
AlmaLinux 9postgresql-pltclFixed15.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14827
AlmaLinux 9postgresql-private-develFixed16.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14862
AlmaLinux 9postgresql-private-libsFixed16.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14862
AlmaLinux 9postgresql-serverFixed16.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14862
AlmaLinux 9postgresql-server-develFixed15.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14827
AlmaLinux 9postgresql-staticFixed15.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14827
AlmaLinux 9postgresql-testFixed15.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14827
AlmaLinux 9postgresql-test-rpm-macrosFixed16.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14862
AlmaLinux 9postgresql-upgradeFixed15.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14827
AlmaLinux 9postgresql-upgrade-develFixed15.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14827
AlmaLinux 8pg_repackFixed1.4.6-3.module_el8.6.0+2760+1746ec94ALSA-2025:14899
AlmaLinux 8pgauditFixed1.5.0-1.module_el8.6.0+3095+ee60d910ALSA-2025:15022
AlmaLinux 8postgres-decoderbufsFixed2.4.0-1.Final.module_el8.10.0+3798+606ebb9fALSA-2025:15021
AlmaLinux 8postgresqlFixed13.22-1.module_el8.10.0+4042+cb252986ALSA-2025:15022
AlmaLinux 8postgresql-contribFixed15.14-1.module_el8.10.0+4041+afd30bb4ALSA-2025:14899
AlmaLinux 8postgresql-docsFixed15.14-1.module_el8.10.0+4041+afd30bb4ALSA-2025:15021
AlmaLinux 8postgresql-plperlFixed15.14-1.module_el8.10.0+4041+afd30bb4ALSA-2025:14899
AlmaLinux 8postgresql-plpython3Fixed13.22-1.module_el8.10.0+4042+cb252986ALSA-2025:14899
AlmaLinux 8postgresql-pltclFixed16.10-1.module_el8.10.0+4038+0fbad93cALSA-2025:15022
AlmaLinux 8postgresql-private-develFixed15.14-1.module_el8.10.0+4041+afd30bb4ALSA-2025:14899
AlmaLinux 8postgresql-private-libsFixed15.14-1.module_el8.10.0+4041+afd30bb4ALSA-2025:14899
AlmaLinux 8postgresql-serverFixed15.14-1.module_el8.10.0+4041+afd30bb4ALSA-2025:15021
AlmaLinux 8postgresql-server-develFixed16.10-1.module_el8.10.0+4038+0fbad93cALSA-2025:15021
AlmaLinux 8postgresql-staticFixed13.22-1.module_el8.10.0+4042+cb252986ALSA-2025:14899
AlmaLinux 8postgresql-testFixed16.10-1.module_el8.10.0+4038+0fbad93cALSA-2025:15022
AlmaLinux 8postgresql-test-rpm-macrosFixed15.14-1.module_el8.10.0+4041+afd30bb4ALSA-2025:14899
AlmaLinux 8postgresql-upgradeFixed16.10-1.module_el8.10.0+4038+0fbad93cALSA-2025:15022
AlmaLinux 8postgresql-upgrade-develFixed15.14-1.module_el8.10.0+4041+afd30bb4ALSA-2025:15021
Alpine Linux 3.24postgresql16Fixed16.9-r0ALPINE-CVE-2025-4207
Alpine Linux 3.24postgresql17Fixed17.5-r0ALPINE-CVE-2025-4207
Alpine Linux 3.23postgresql16Fixed16.9-r0ALPINE-CVE-2025-4207
Alpine Linux 3.23postgresql17Fixed17.5-r0ALPINE-CVE-2025-4207
Alpine Linux 3.22postgresql15Fixed15.13-r0ALPINE-CVE-2025-4207
Alpine Linux 3.22postgresql16Fixed16.9-r0ALPINE-CVE-2025-4207
Alpine Linux 3.22postgresql17Fixed17.5-r0ALPINE-CVE-2025-4207
Alpine Linux 3.21postgresql15Fixed15.13-r0ALPINE-CVE-2025-4207
Alpine Linux 3.21postgresql16Fixed16.9-r0ALPINE-CVE-2025-4207
Alpine Linux 3.21postgresql17Fixed17.5-r0ALPINE-CVE-2025-4207
Alpine Linux 3.20postgresql15Fixed15.13-r0ALPINE-CVE-2025-4207
Alpine Linux 3.20postgresql16Fixed16.9-r0ALPINE-CVE-2025-4207
Alpine Linux 3.19postgresql15Fixed15.13-r0ALPINE-CVE-2025-4207
Alpine Linux 3.19postgresql16Fixed16.9-r0ALPINE-CVE-2025-4207
Alpine Linux 3.18postgresql14Fixed14.18-r0ALPINE-CVE-2025-4207
Alpine Linux 3.18postgresql15Fixed15.13-r0ALPINE-CVE-2025-4207

What the vendor says

As published in the CVE record by PostgreSQL, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.