cve.bz

CVE-2020-25695 SQL Injection

8.8 highEPSS 46%

High (8.8). EPSS 46% estimated probability of exploitation activity in the next 30 days.

On this page
A flaw was found in PostgreSQL versions before 13.1, before 12.5, before 11.10, before 10.15, before 9.6.20 and before 9.5.24. An attacker having permission to create non-temporary objects in at least one schema can execute arbitrary SQL functions under the identity of a superuser. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.

Severity

CVSS 3.1

8.8 high
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
46% (unchanged from 46% a week ago; 46% 30 days ago) estimated probability of exploitation activity in the next 30 days; 99th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-89 Improper Neutralization of Special Elements used in an SQL Command (SQL Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2020-25695 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2020-25695?via=ask-ai-copy and https://cve.bz/cve/CVE-2020-25695?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2020-25695 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
postgresql:postgresqlbefore 9.5.24
postgresql:postgresqlfrom 9.6.0 before 9.6.20
postgresql:postgresqlfrom 10.0 before 10.15
postgresql:postgresqlfrom 11.0 before 11.10
postgresql:postgresqlfrom 12.0 before 12.5
postgresql:postgresqlfrom 13.0 before 13.1
debian:debian_linux9.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian9postgresql-9.69.6.20-0+deb9u1DLA-2478-1
Debian11postgresql-1313.1-1DEBIAN-CVE-2020-25695
Ubuntu16.04:LTSpostgresql-9.59.5.24-0ubuntu0.16.04.1UBUNTU-CVE-2020-25695 USN-4633-1
Ubuntu18.04:LTSpostgresql-1010.15-0ubuntu0.18.04.1UBUNTU-CVE-2020-25695 USN-4633-1
Ubuntu20.04:LTSpostgresql-1212.5-0ubuntu0.20.04.1UBUNTU-CVE-2020-25695 USN-4633-1
UbuntuPro:14.04:LTSpostgresql-9.3no fix listedUBUNTU-CVE-2020-25695
Red Hatenterprise_linux:7::client, enterprise_linux:7::server, enterprise_linux:7::workstationpostgresql, postgresql-docs, postgresql-libs and 10 more0:9.2.24-6.el7_9RHSA-2021:1512
Red Hatenterprise_linux:7::computenodepostgresql, postgresql-docs, postgresql-test and 9 more0:9.2.24-6.el7_9RHSA-2021:1512
Red Hatenterprise_linux:8::appstreampgaudit, pgaudit-debuginfo, pgaudit-debugsource0:1.4.0-4.module+el8.3.0+9042+664538f4RHSA-2020:5620
Red Hatenterprise_linux:8::appstreampostgres-decoderbufs, postgres-decoderbufs-debuginfo, postgres-decoderbufs-debugsource0:0.10.0-2.module+el8.3.0+9042+664538f4RHSA-2020:5620
Red Hatenterprise_linux:8::appstreampostgresql, postgresql-docs, postgresql-test and 18 more0:9.6.20-1.module+el8.3.0+8938+7f0e88b6RHSA-2020:5619
Red Hatenterprise_linux:8::appstreampostgresql, postgresql-docs, postgresql-test and 22 more0:10.15-1.module+el8.3.0+8944+1ca16b1fRHSA-2020:5567
Red Hatenterprise_linux:8::appstreampostgresql, postgresql-docs, postgresql-test and 22 more0:12.5-1.module+el8.3.0+9042+664538f4RHSA-2020:5620
Red Hatrhel_e4s:8.0::appstreampostgresql, postgresql-docs, postgresql-test and 18 more0:9.6.20-1.module+el8.0.0+9157+356b8defRHSA-2020:5661
Red Hatrhel_e4s:8.0::appstreampostgresql, postgresql-docs, postgresql-test and 22 more0:10.15-1.module+el8.0.0+9155+4a85661aRHSA-2020:5664
Red Hatrhel_eus:8.1::appstreampostgresql, postgresql-docs, postgresql-test and 18 more0:9.6.20-1.module+el8.1.0+9156+8ff1384fRHSA-2021:0167
Red Hatrhel_eus:8.1::appstreampostgresql, postgresql-docs, postgresql-test and 22 more0:10.15-1.module+el8.1.0+9154+cd474635RHSA-2021:0166
Red Hatrhel_eus:8.2::appstreampgaudit, pgaudit-debuginfo, pgaudit-debugsource0:1.4.0-4.module+el8.2.0+9043+1dbb5661RHSA-2021:0163
6 more for Red Hat in the JSON and on Red Hat's page.
SUSEEnterprise Storage 5, HPE Helion OpenStack 8, Linux Enterprise Server 12 SP2-BCL and 15 morepostgresql13-4.7.1SUSE-SU-2021:0217-1
SUSEEnterprise Storage 5, HPE Helion OpenStack 8, Linux Enterprise Server 12 SP2-BCL and 15 morepostgresql1010.15-4.9.1SUSE-SU-2020:3464-1
SUSEEnterprise Storage 5, HPE Helion OpenStack 8, Linux Enterprise Server 12 SP2-BCL and 15 morepostgresql1212.5-3.9.3SUSE-SU-2020:3630-1
SUSEEnterprise Storage 5, HPE Helion OpenStack 8, Linux Enterprise Server 12 SP2-BCL and 15 morepostgresql1313.1-3.3.1SUSE-SU-2021:0217-1
SUSEEnterprise Storage 5, HPE Helion OpenStack 8, Linux Enterprise Server 12 SP2-BCL and 8 morepostgresql969.6.20-6.8.1SUSE-SU-2020:3477-1
SUSELinux Enterprise High Performance Computing 15-ESPOS, Linux Enterprise High Performance Computing 15-LTSS, Linux Enterprise Server 15-LTSS and 1 morepostgresql1010.15-4.28.1SUSE-SU-2020:3455-1
SUSELinux Enterprise Module for Basesystem 15 SP1, Linux Enterprise Module for Basesystem 15 SP2, Linux Enterprise Module for Server Applications 15 SP1 and 1 morepostgresql1010.15-8.22.1SUSE-SU-2020:3476-1
SUSELinux Enterprise Module for Basesystem 15 SP1, Linux Enterprise Module for Server Applications 15 SP1postgresql1212.5-3.15.1SUSE-SU-2020:3425-1
SUSELinux Enterprise Module for Basesystem 15 SP2, Linux Enterprise Module for Package Hub 15 SP2, Linux Enterprise Module for Server Applications 15 SP2postgresql13-4.6.7SUSE-SU-2021:0175-1
SUSELinux Enterprise Module for Basesystem 15 SP2, Linux Enterprise Module for Package Hub 15 SP2, Linux Enterprise Module for Server Applications 15 SP2postgresql1313.1-5.3.15SUSE-SU-2021:0175-1
SUSELinux Enterprise Module for Basesystem 15 SP2, Linux Enterprise Module for Server Applications 15 SP2postgresql1212.5-8.10.1SUSE-SU-2020:3463-1
SUSELinux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5, Linux Enterprise Software Development Kit 12 SP5postgresql1212.5-3.12.3SUSE-SU-2021:0217-1
openSUSELeap 15.1postgresql1010.15-lp151.2.21.1openSUSE-SU-2020:2028-1
openSUSELeap 15.1postgresql1212.5-lp151.10.1openSUSE-SU-2020:2029-1
openSUSELeap 15.2postgresql13-lp152.3.6.1openSUSE-SU-2021:0337-1
openSUSELeap 15.2postgresql1010.15-lp152.2.9.1openSUSE-SU-2020:2019-1
openSUSELeap 15.2postgresql1212.5-lp152.3.10.1openSUSE-SU-2020:2018-1
openSUSETumbleweedpostgresql1010.18-1.3openSUSE-SU-2024:11184-1
openSUSETumbleweedpostgresql1111.13-1.3openSUSE-SU-2024:11185-1
openSUSETumbleweedpostgresql1212.8-1.3openSUSE-SU-2024:11186-1
openSUSETumbleweedpostgresql1313.4-1.3openSUSE-SU-2024:11187-1
openSUSETumbleweedpostgresql1414.5-2.1openSUSE-SU-2024:12387-1
openSUSETumbleweedpostgresql1515.4-2.1openSUSE-SU-2024:13243-1
openSUSETumbleweedpostgresql1616.4-1.1openSUSE-SU-2024:14360-1
1 more for openSUSE in the JSON and on openSUSE's page.
AlmaLinux8postgres-decoderbufs0.10.0-2.module_el8.6.0+2758+4f4474dfALSA-2020:5620
AlmaLinux8postgres-decoderbufs0.10.0-2.module_el8.6.0+2760+1746ec94ALSA-2020:5620
Rocky Linux8pgaudit0:1.4.0-4.module+el8.4.0+545+ca56da2eRLSA-2020:5620
Rocky Linux8postgres-decoderbufs0:0.10.0-2.module+el8.4.0+424+71d47d9aRLSA-2020:5620
Rocky Linux8postgres-decoderbufs0:0.10.0-2.module+el8.5.0+684+c3892ef9RLSA-2020:5620
Alpinev3.9, v3.10postgresql11.10-r0ALPINE-CVE-2020-25695
Alpinev3.11, v3.12, v3.13 and 1 morepostgresql12.5-r0ALPINE-CVE-2020-25695
Alpinev3.15, v3.16postgresql12, postgresql1412.5-r0ALPINE-CVE-2020-25695
Alpinev3.17, v3.18postgresql12, postgresql14, postgresql1512.5-r0ALPINE-CVE-2020-25695
Alpinev3.19, v3.20postgresql14, postgresql1512.5-r0ALPINE-CVE-2020-25695

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Important.

Red Hat's statement

In Red Hat Gluster Storage 3, PostgreSQL (embedded in rhevm-dependencies) was shipped as a part of Red Hat Gluster Storage Console that is no longer supported for use with Red Hat Gluster Storage 3.5. Red Hat Gluster Storage Web Administration is now the recommended monitoring tool for Red Hat Storage Gluster clusters.

In Red Hat Virtualization the manager appliance uses a vulnerable version of postgresql. Once a fix has been shipped for RHEL 8 the appliance can consume the fix via a regular yum update.

Red Hat's mitigation

While promptly updating PostgreSQL is the best remediation for most users, a user unable to do that can work around the vulnerability by disabling autovacuum and not manually running ANALYZE, CLUSTER, REINDEX, CREATE INDEX, VACUUM FULL, REFRESH MATERIALIZED VIEW, or a restore from output of the pg_dump command. Performance may degrade quickly under this workaround.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 7postgresql-0:9.2.24-6.el7_9Fixed 2021-05-06RHSA-2021:1512
Red Hat Enterprise Linux 8postgresql:10-8030020201201142418.229f0a1cFixed 2020-12-16RHSA-2020:5567
Red Hat Enterprise Linux 8postgresql:9.6-8030020201201133334.229f0a1cFixed 2020-12-17RHSA-2020:5619
Red Hat Enterprise Linux 8postgresql:12-8030020201207110000.229f0a1cFixed 2020-12-17RHSA-2020:5620
Red Hat Enterprise Linux 8.0 Update Services for SAP Solutionspostgresql:9.6-8000020201214122017.f8e95b4eFixed 2020-12-22RHSA-2020:5661
Red Hat Enterprise Linux 8.0 Update Services for SAP Solutionspostgresql:10-8000020201214113918.f8e95b4eFixed 2020-12-22RHSA-2020:5664
Red Hat Enterprise Linux 8.1 Extended Update Supportpostgresql:10-8010020201214112129.c27ad7f8Fixed 2021-01-18RHSA-2021:0166
Red Hat Enterprise Linux 8.1 Extended Update Supportpostgresql:9.6-8010020201214134447.c27ad7f8Fixed 2021-01-18RHSA-2021:0167
Red Hat Enterprise Linux 8.2 Extended Update Supportpostgresql:10-8020020201201142418.4cda2c84Fixed 2021-01-18RHSA-2021:0161
Red Hat Enterprise Linux 8.2 Extended Update Supportpostgresql:12-8020020201207110224.4cda2c84Fixed 2021-01-18RHSA-2021:0163
Red Hat build of QuarkuspostgresqlNot affected
Red Hat Decision Manager 7postgresqlNot affected
Red Hat Enterprise Linux 5postgresqlOut of support scope
Red Hat Enterprise Linux 5postgresql84Out of support scope
Red Hat Enterprise Linux 6postgresqlOut of support scope
Red Hat Enterprise Linux 8libpqNot affected
Red Hat Enterprise Linux 9postgresqlNot affected
Red Hat Fuse 7postgresqlNot affected
Red Hat JBoss Enterprise Application Platform 6postgresqlNot affected
Red Hat JBoss Enterprise Application Platform 7postgresqlNot affected
9 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2020-25695.

Attack patterns (CAPEC)

  • CAPEC-7 Blind SQL Injection Likelihood: High · Severity: High
  • CAPEC-66 SQL Injection Likelihood: High · Severity: High
  • CAPEC-108 Command Line Execution through SQL Injection Likelihood: Low · Severity: Very High
  • CAPEC-109 Object Relational Mapping Injection Likelihood: Low · Severity: High
  • CAPEC-110 SQL Injection through SOAP Parameter Tampering Likelihood: High · Severity: Very High
  • CAPEC-470 Expanding Control over the Operating System from the Database Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON