CVE-2020-25695: SQL Injection

Published Nov 4, 2020
·
Updated

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.

Other sources

A flaw was found in postgresql. 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.

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. 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 pgdump command. Performance may degrade quickly under this workaround. VACUUM, without the FULL option, is safe, and all commands are fine when a trusted user owns the target object.

Red Hat

PostgreSQL could allow a remote authenticated attacker to gain elevated privileges on the system, caused by a flaw when creating non-temporary objects in at least one schema. By sending a specially-crafted request, an attacker could exploit this vulnerability to execute arbitrary SQL functions under the identity of a superuser.

IBM

Affected Software

17 affected componentsFixes available
redhat/postgresql<0:9.2.24-6.el7_9
0:9.2.24-6.el7_9
redhat/rh-postgresql10-postgresql<0:10.15-1.el7
0:10.15-1.el7
redhat/rh-postgresql12-postgresql<0:12.5-1.el7
0:12.5-1.el7
redhat/postgresql<13.1
13.1
redhat/postgresql<12.5
12.5
redhat/postgresql<11.10
11.10
redhat/postgresql<10.15
10.15
redhat/postgresql<9.6.20
9.6.20
redhat/postgresql<9.5.24
9.5.24
IBM Analytics Content Hub<=2.0
PostgreSQL postgresql<9.5.24
PostgreSQL postgresql>=9.6.0<9.6.20
PostgreSQL postgresql>=10.0<10.15
PostgreSQL postgresql>=11.0<11.10
PostgreSQL postgresql>=12.0<12.5
PostgreSQL postgresql>=13.0<13.1
Debian Debian Linux=9.0

Remediation

Information

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.

Event History

Nov 4, 2020
Data Sourced
via Red Hat·09:06 AM
DescriptionSeverityAffected Software
Nov 12, 2020
CVE Published
12:00 AM
Nov 16, 2020
CVE Published
via MITRE·12:40 AM
Data Sourced
via MITRE·12:40 AM
DescriptionWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2020-25695?

CVE-2020-25695 is a vulnerability 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 that allows an attacker to execute arbitrary SQL functions as a superuser.

2

What software versions are affected by CVE-2020-25695?

CVE-2020-25695 affects PostgreSQL versions before 13.1, before 12.5, before 11.10, before 10.15, before 9.6.20, and before 9.5.24.

3

What is the severity of CVE-2020-25695?

CVE-2020-25695 has a severity rating of 8.8 (high).

4

How can an attacker exploit CVE-2020-25695?

An attacker with permission to create non-temporary objects in at least one schema can exploit CVE-2020-25695 to execute arbitrary SQL functions as a superuser.

5

Are there any references for CVE-2020-25695?

Yes, you can find references for CVE-2020-25695 at the following links: [CVE-2020-25695](https://www.cve.org/CVERecord?id=CVE-2020-25695), [NVD](https://nvd.nist.gov/vuln/detail/CVE-2020-25695), [Staaldraad](https://staaldraad.github.io/post/2020-12-15-cve-2020-25695-postgresql-privesc/), [PostgreSQL News](https://www.postgresql.org/about/news/postgresql-131-125-1110-1015-9620-and-9524-released-2111/), [Red Hat Bugzilla](https://bugzilla.redhat.com/show_bug.cgi?id=1894425), and [Red Hat Security Advisory](https://access.redhat.com/errata/RHSA-2021:1512).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203