CVE-2019-10208

Impact:
Moderate
Public Date:
2019-08-08
CWE:
CWE-89
Bugzilla:
1734416: CVE-2019-10208 postgresql: TYPE in pg_temp executes arbitrary SQL during SECURITY DEFINER execution
A flaw was discovered in postgresql where arbitrary SQL statements can be executed given a suitable SECURITY DEFINER function. An attacker, with EXECUTE permission on the function, can execute arbitrary SQL as the owner of the function.

Find out more about CVE-2019-10208 from the MITRE CVE dictionary dictionary and NIST NVD.

Statement

Red Hat Virtualization Management Appliance included affected versions of postgresql, however no custom SECURITY DEFINER functions are declared so this vulnerability can not be exploited in the default configuration.

CVSS v3 metrics

NOTE: The following CVSS v3 metrics and score provided are preliminary and subject to review.

CVSS3 Base Score 7.5
CVSS3 Base Metrics CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack Vector Network
Attack Complexity High
Privileges Required Low
User Interaction None
Scope Unchanged
Confidentiality High
Integrity Impact High
Availability Impact High

Affected Packages State

Platform Package State
Red Hat Virtualization 4 rh-postgresql10-postgresql Will not fix
Red Hat Virtualization 4 rh-postgresql95-postgresql Out of support scope
Red Hat Software Collections for Red Hat Enterprise Linux rh-postgresql10-postgresql Affected
Red Hat Software Collections for Red Hat Enterprise Linux rh-postgresql96-postgresql Affected
Red Hat Satellite 5 rh-postgresql95-postgresql Out of support scope
Red Hat Gluster Storage 3 rhevm-dependencies Not affected
Red Hat Enterprise Linux 8 libpq Not affected
Red Hat Enterprise Linux 8 postgresql:10/postgresql Affected
Red Hat Enterprise Linux 8 postgresql:9.6/postgresql Affected
Red Hat Enterprise Linux 8 postgresql Affected
Red Hat Enterprise Linux 7 postgresql Affected
Red Hat Enterprise Linux 6 postgresql Out of support scope
Red Hat Enterprise Linux 5 postgresql Out of support scope
Unless explicitly stated as not affected, all previous versions of packages in any minor update stream of a product listed here should be assumed vulnerable, although may not have been subject to full analysis.

Acknowledgements

Red Hat would like to thank the PostgreSQL project for reporting this issue. Upstream acknowledges Tom Lane as the original reporter.

Mitigation

If your use case requires SECURITY DEFINER functions, please follow the advice below to write them safely so they do not rely on search_path and restrict the set of users which can access them.

https://www.postgresql.org/docs/devel/sql-createfunction.html#SQL-CREATEFUNCTION-SECURITY

External References

Last Modified