CVE-2017-7485 - Missing Encryption of Sensitive Data

Severity

43%

Complexity

86%

Confidentiality

48%

In PostgreSQL 9.3.x before 9.3.17, 9.4.x before 9.4.12, 9.5.x before 9.5.7, and 9.6.x before 9.6.3, it was found that the PGREQUIRESSL environment variable was no longer enforcing a SSL/TLS connection to a PostgreSQL server. An active Man-in-the-Middle attacker could use this flaw to strip the SSL/TLS protection from a connection between a client and a server.

In PostgreSQL 9.3.x before 9.3.17, 9.4.x before 9.4.12, 9.5.x before 9.5.7, and 9.6.x before 9.6.3, it was found that the PGREQUIRESSL environment variable was no longer enforcing a SSL/TLS connection to a PostgreSQL server. An active Man-in-the-Middle attacker could use this flaw to strip the SSL/TLS protection from a connection between a client and a server.

CVSS 3.0 Base Score 5.9. CVSS Attack Vector: network. CVSS Attack Complexity: high. CVSS Vector: (CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N).

CVSS 2.0 Base Score 4.3. CVSS Attack Vector: network. CVSS Attack Complexity: medium. CVSS Vector: (AV:N/AC:M/Au:N/C:N/I:P/A:N).

Demo Examples

Missing Encryption of Sensitive Data

CWE-311

This code writes a user's login information to a cookie so the user does not have to login again later.


               
}
setcookie ("userdata", $data);

The code stores the user's username and password in plaintext in a cookie on the user's machine. This exposes the user's login information if their computer is compromised by an attacker. Even if the user's machine is not compromised, this weakness combined with cross-site scripting (CWE-79) could allow an attacker to remotely copy the cookie.

Also note this example code also exhibits Plaintext Storage in a Cookie (CWE-315).

Missing Encryption of Sensitive Data

CWE-311

The following code attempts to establish a connection, read in a password, then store it to a buffer.


               
...

While successful, the program does not encrypt the data before writing it to a buffer, possibly exposing it to unauthorized actors.

Missing Encryption of Sensitive Data

CWE-311

The following code attempts to establish a connection to a site to communicate sensitive information.


               
}
hu.disconnect();
//...

Though a connection is successfully made, the connection is unencrypted and it is possible that all sensitive data sent to or received from the server will be read by unintended actors.

Overview

Type

PostgreSQL

First reported 7 years ago

2017-05-12 19:29:00

Last updated 5 years ago

2019-10-03 00:03:00

Affected Software

PostgreSQL PostgreSQL 9.3

9.3

PostgreSQL PostgreSQL 9.3.1

9.3.1

PostgreSQL PostgreSQL 9.3.2

9.3.2

PostgreSQL PostgreSQL 9.3.3

9.3.3

PostgreSQL 9.3.4

9.3.4

PostgreSQL 9.3.5

9.3.5

PostgreSQL 9.3.6

9.3.6

PostgreSQL 9.3.7

9.3.7

PostgreSQL 9.3.8

9.3.8

PostgreSQL 9.3.9

9.3.9

PostgreSQL 9.3.10

9.3.10

PostgreSQL 9.3.11

9.3.11

PostgreSQL 9.3.12

9.3.12

PostgreSQL 9.3.13

9.3.13

PostgreSQL 9.3.14

9.3.14

PostgreSQL 9.3.15

9.3.15

PostgreSQL 9.3.16

9.3.16

PostgreSQL PostgreSQL 9.4

9.4

PostgreSQL 9.4.1

9.4.1

PostgreSQL 9.4.2

9.4.2

PostgreSQL 9.4.3

9.4.3

PostgreSQL 9.4.4

9.4.4

PostgreSQL PostgreSQL 9.4.5

9.4.5

PostgreSQL 9.4.6

9.4.6

PostgreSQL 9.4.7

9.4.7

PostgreSQL 9.4.8

9.4.8

PostgreSQL 9.4.9

9.4.9

PostgreSQL 9.4.10

9.4.10

PostgreSQL 9.4.11

9.4.11

PostgreSQL PostgreSQL 9.5

9.5

PostgreSQL 9.5.1

9.5.1

PostgreSQL 9.5.2

9.5.2

PostgreSQL 9.5.3

9.5.3

PostgreSQL 9.5.4

9.5.4

PostgreSQL 9.5.5

9.5.5

PostgreSQL 9.5.6

9.5.6

PostgreSQL 9.6

9.6

PostgreSQL 9.6.1

9.6.1

PostgreSQL 9.6.2

9.6.2

Stay updated

ExploitPedia is constantly evolving. Sign up to receive a notification when we release additional functionality.

Get in touch

If you'd like to report a bug or have any suggestions for improvements then please do get in touch with us using this form. We will get back to you as soon as we can.