CVE-2016-5424: Code Injection

Published Aug 4, 2016
·
Updated

It was found that PostgreSQL client programs mishandle database and role names containing newlines, carriage returns, double quotes, or backslashes. By crafting such an object name, roles with the CREATEDB or CREATEROLE option could escalate their privileges to superuser when a superuser next executes maintenance with a vulnerable program. Vulnerable programs include pgdumpall, pgupgrade, vacuumdb, reindexdb, and clusterdb.

Other sources

PostgreSQL before 9.1.23, 9.2.x before 9.2.18, 9.3.x before 9.3.14, 9.4.x before 9.4.9, and 9.5.x before 9.5.4 might allow remote authenticated users with the CREATEDB or CREATEROLE role to gain superuser privileges via a (1) " (double quote), (2) \ (backslash), (3) carriage return, or (4) newline character in a (a) database or (b) role name that is mishandled during an administrative operation.

— MITRE

Affected Software

52 affected componentsFixes available
redhat/postgresql<9.5.4
9.5.4
redhat/postgresql<9.4.9
9.4.9
redhat/postgresql<9.3.14
9.3.14
redhat/postgresql<9.2.18
9.2.18
redhat/postgresql<9.1.23
9.1.23
Debian Debian Linux=8.0
PostgreSQL postgresql<=9.1.22
PostgreSQL postgresql=9.2
PostgreSQL postgresql=9.2.1
PostgreSQL postgresql=9.2.2
PostgreSQL postgresql=9.2.3
PostgreSQL postgresql=9.2.4
PostgreSQL postgresql=9.2.5
PostgreSQL postgresql=9.2.6
PostgreSQL postgresql=9.2.7
PostgreSQL postgresql=9.2.8
PostgreSQL postgresql=9.2.9
PostgreSQL postgresql=9.2.10
PostgreSQL postgresql=9.2.11
PostgreSQL postgresql=9.2.12
PostgreSQL postgresql=9.2.13
PostgreSQL postgresql=9.2.14
PostgreSQL postgresql=9.2.15
PostgreSQL postgresql=9.2.16
PostgreSQL postgresql=9.2.17
PostgreSQL postgresql=9.3
PostgreSQL postgresql=9.3.1
PostgreSQL postgresql=9.3.2
PostgreSQL postgresql=9.3.3
PostgreSQL postgresql=9.3.4
PostgreSQL postgresql=9.3.5
PostgreSQL postgresql=9.3.6
PostgreSQL postgresql=9.3.7
PostgreSQL postgresql=9.3.8
PostgreSQL postgresql=9.3.9
PostgreSQL postgresql=9.3.10
PostgreSQL postgresql=9.3.11
PostgreSQL postgresql=9.3.12
PostgreSQL postgresql=9.3.13
PostgreSQL postgresql=9.4
PostgreSQL postgresql=9.4.1
PostgreSQL postgresql=9.4.2
PostgreSQL postgresql=9.4.3
PostgreSQL postgresql=9.4.4
PostgreSQL postgresql=9.4.5
PostgreSQL postgresql=9.4.6
PostgreSQL postgresql=9.4.7
PostgreSQL postgresql=9.4.8
PostgreSQL postgresql=9.5
PostgreSQL postgresql=9.5.1
PostgreSQL postgresql=9.5.2
PostgreSQL postgresql=9.5.3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/postgresql to a version that resolves this vulnerability.

    Fixed in 9.5.4
  2. Upgrade

    Upgrade redhat/postgresql to a version that resolves this vulnerability.

    Fixed in 9.4.9
  3. Upgrade

    Upgrade redhat/postgresql to a version that resolves this vulnerability.

    Fixed in 9.3.14
  4. Upgrade

    Upgrade redhat/postgresql to a version that resolves this vulnerability.

    Fixed in 9.2.18
  5. Upgrade

    Upgrade redhat/postgresql to a version that resolves this vulnerability.

    Fixed in 9.1.23
  6. Upgrade

    Upgrade PostgreSQL to a version that resolves this vulnerability.

    Fixed in 9.1.23
  7. Upgrade

    Upgrade PostgreSQL to a version that resolves this vulnerability.

    Fixed in 9.2.18
  8. Upgrade

    Upgrade PostgreSQL to a version that resolves this vulnerability.

    Fixed in 9.3.14
  9. Upgrade

    Upgrade PostgreSQL to a version that resolves this vulnerability.

    Fixed in 9.4.9
  10. Upgrade

    Upgrade PostgreSQL to a version that resolves this vulnerability.

    Fixed in 9.5.4

Event History

Aug 4, 2016
Data Sourced
09:10 AM
DescriptionSeverityAffected Software
Dec 9, 2016
CVE Published
via MITRE·11:00 PM
Data Sourced
via MITRE·11:00 PM
Description
Data Sourced
11:59 PM
RemedyWeakness
Data Sourced
via NVD·11:59 PM
RemedyDescriptionSeverityWeaknessAffected Software
Feb 17, 2021
Data Sourced
via Red Hat·03:28 AM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2016-5424?

CVE-2016-5424 is classified as a high severity vulnerability due to the potential for remote authenticated users to gain superuser privileges.

2

How do I fix CVE-2016-5424?

To fix CVE-2016-5424, you should upgrade to PostgreSQL version 9.5.4, 9.4.9, 9.3.14, 9.2.18, or 9.1.23 as these versions contain the necessary patches.

3

Who is affected by CVE-2016-5424?

CVE-2016-5424 affects PostgreSQL versions prior to 9.1.23, 9.2.x before 9.2.18, 9.3.x before 9.3.14, 9.4.x before 9.4.9, and 9.5.x before 9.5.4.

4

What types of roles can exploit CVE-2016-5424?

Remote authenticated users with the CREATEDB or CREATEROLE role can exploit CVE-2016-5424 to escalate their privileges to superuser.

5

What kind of privileges can be gained from CVE-2016-5424?

CVE-2016-5424 may allow unauthorized escalation to superuser privileges, enabling full access to the database.

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