CVE-2018-1053: High severity PostgreSQL postgresql vulnerability

Published Jan 29, 2018
·
Updated

In postgresql 9.3.x before 9.3.21, 9.4.x before 9.4.16, 9.5.x before 9.5.11, 9.6.x before 9.6.7 and 10.x before 10.2, pgupgrade creates file in current working directory containing the output of pgdumpall -g under umask which was in effect when the user invoked pgupgrade, and not under 0077 which is normally used for other temporary files. This can allow an authenticated attacker to read or modify the one file, which may contain encrypted or unencrypted database passwords. The attack is infeasible if a directory mode blocks the attacker searching the current working directory or if the prevailing umask blocks the attacker opening the file.

Other sources

pgupgrade creates temporary files in the current working directory. It creates most of them with umask 0077, so only the current user can open those. However, for the file containing the output of "pgdumpall -g", it uses the umask in effect when the user invoked pgupgrade. This can allow an attacker to read or modify the one file, which may contain encrypted or unencrypted database passwords. However, the attack is infeasible if a directory mode blocks the attacker searching the current working directory or if the prevailing umask blocks the attacker opening the file.

Vulnerable Versions: 9.3 - 10

Red Hat

Affected Software

18 affected componentsFixes available
debian/postgresql-10
debian/postgresql-9.1
redhat/postgresql<9.3.21
9.3.21
redhat/postgresql<9.4.16
9.4.16
redhat/postgresql<9.5.11
9.5.11
redhat/postgresql<9.6.7
9.6.7
redhat/postgresql<10.2
10.2
PostgreSQL postgresql>=9.3.0<9.3.21
PostgreSQL postgresql>=9.4.0<9.4.16
PostgreSQL postgresql>=9.5.0<9.5.11
PostgreSQL postgresql>=9.6.0<9.6.7
PostgreSQL postgresql=10.0
PostgreSQL postgresql=10.1
Debian Debian Linux=7.0
Canonical Ubuntu Linux=14.04
Canonical Ubuntu Linux=16.04
Canonical Ubuntu Linux=17.10
redhat Cloudforms=4.6

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.3.21
  2. Upgrade

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

    Fixed in 9.4.16
  3. Upgrade

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

    Fixed in 9.5.11
  4. Upgrade

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

    Fixed in 9.6.7
  5. Upgrade

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

    Fixed in 10.2
  6. Upgrade

    Upgrade PostgreSQL to a version that resolves this vulnerability.

    Fixed in 9.3.21
  7. Upgrade

    Upgrade PostgreSQL to a version that resolves this vulnerability.

    Fixed in 9.4.16
  8. Upgrade

    Upgrade PostgreSQL to a version that resolves this vulnerability.

    Fixed in 9.5.11
  9. Upgrade

    Upgrade PostgreSQL to a version that resolves this vulnerability.

    Fixed in 9.6.7
  10. Upgrade

    Upgrade PostgreSQL to a version that resolves this vulnerability.

    Fixed in 10.2
  11. Configuration

    Ensure the directory mode of the current working directory used by pg_upgrade blocks an attacker from searching that directory (so an attacker cannot access the pg_upgrade-generated temporary file).

    pg_upgrade directory mode / current working directory access = block searching the current working directory
  12. Configuration

    Invoke pg_upgrade with a prevailing umask that blocks other users from opening the temporary file it creates in the current working directory (the text notes umask 0077 normally restricts access to only the invoking user).

    pg_upgrade umask = blocks attacker opening the file

Event History

Jan 29, 2018
Data Sourced
via Red Hat·10:40 AM
DescriptionSeverityAffected Software
Feb 9, 2018
CVE Published
via MITRE·02:00 PM
Data Sourced
via MITRE·02:00 PM
DescriptionWeakness
Data Sourced
via NVD·02:29 PM
RemedyDescriptionSeverityWeaknessAffected Software
Jan 11, 2024
Data Sourced
via Launchpad·10:45 PM
Description
Feb 20, 2026
Data Sourced
via Ubuntu·06:39 PM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the vulnerability ID?

The vulnerability ID is CVE-2018-1053.

2

What is the severity of CVE-2018-1053?

CVE-2018-1053 has a severity level of high.

3

What is the affected software?

The affected software includes PostgreSQL versions 9.3.x, 9.4.x, 9.5.x, 9.6.x, and 10.x.

4

How can I fix CVE-2018-1053?

To fix CVE-2018-1053, upgrade to PostgreSQL versions 9.3.21, 9.4.16, 9.5.11, 9.6.7, or 10.2.

5

Are there any additional references for CVE-2018-1053?

Yes, you can find additional references for CVE-2018-1053 at the following links: [link1], [link2], [link3].

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