1. CVE archive
  2. 2017
  3. CVE-2017-12172

CVE-2017-12172

6.7 Medium severity CVSS v3.0 · source NVD CVSS:3.0/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H 6.7 – Medium

Description

PostgreSQL 10.x before 10.1, 9.6.x before 9.6.6, 9.5.x before 9.5.10, 9.4.x before 9.4.15, 9.3.x before 9.3.20, and 9.2.x before 9.2.24 runs under a non-root operating system account, and database superusers have effective ability to run arbitrary code under that system account. PostgreSQL provides a script for starting the database server during system boot. Packages of PostgreSQL for many operating systems provide their own, packager-authored startup implementations. Several implementations use a log file name that the database superuser can replace with a symbolic link. As root, they open(), chmod() and/or chown() this log file name. This often suffices for the database superuser to escalate to root privileges when root starts the server.

Affected products

VendorProductVersionPlatform
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.2.18 –
postgresql postgresql 9.2.19 –
postgresql postgresql 9.2.20 –
postgresql postgresql 9.2.21 –
postgresql postgresql 9.2.22 –
postgresql postgresql 9.2.23 –
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.3.14 –
postgresql postgresql 9.3.15 –
postgresql postgresql 9.3.16 –
postgresql postgresql 9.3.17 –
postgresql postgresql 9.3.18 –
postgresql postgresql 9.3.19 –
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.4.9 –
postgresql postgresql 9.4.10 –
postgresql postgresql 9.4.11 –
postgresql postgresql 9.4.12 –
postgresql postgresql 9.4.13 –
postgresql postgresql 9.4.14 –
postgresql postgresql 9.5 –
postgresql postgresql 9.5.1 –
postgresql postgresql 9.5.2 –
postgresql postgresql 9.5.3 –
postgresql postgresql 9.5.4 –
postgresql postgresql 9.5.5 –
postgresql postgresql 9.5.6 –
postgresql postgresql 9.5.7 –
postgresql postgresql 9.5.8 –
postgresql postgresql 9.5.9 –
postgresql postgresql 9.6 –
postgresql postgresql 9.6.1 –
postgresql postgresql 9.6.2 –
postgresql postgresql 9.6.3 –
postgresql postgresql 9.6.4 –
postgresql postgresql 9.6.5 –
postgresql postgresql 10 –
All 203 Postgresql vulnerabilities

Vulnerability type

CWE-59 Improper Link Resolution Before File Access

The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.

Impact on systems

ScopeImpact
Confidentiality, Integrity, Access Control Read Files or Directories, Modify Files or Directories, Bypass Protection Mechanism
An attacker may be able to traverse the file system to unintended locations and read or overwrite the contents of unexpected files. If the files are used for a security mechanism then an attacker may be able to bypass the mechanism.
Other Execute Unauthorized Code or Commands
Windows simple shortcuts, sometimes referred to as soft links, can be exploited remotely since a .LNK file can be uploaded like a normal file. This can enable remote execution.

How to prevent it

Architecture and Design · Separation of Privilege Follow the principle of least privilege when assigning access rights to entities in a software system. Denying access to a file can prevent an attacker from replacing that file with a link to a sensitive file. Ensure good compartmentalization in the system to provide protected areas that can be trusted.

All 1,888 CWE-59 CVEs, with trend and prevention

Source: MITRE CWE catalog · cwe.mitre.org