Bug 1622225 (CVE-2018-10936) - CVE-2018-10936 PostgreSQL: Postgres JDBC driver does not perform host name validation by default
Summary: CVE-2018-10936 PostgreSQL: Postgres JDBC driver does not perform host name va...
Keywords:
Status: NEW
Alias: CVE-2018-10936
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard: impact=low,public=20180827,reported=2...
Depends On: 1623713 1623714 1664337
Blocks: 1622227
TreeView+ depends on / blocked
 
Reported: 2018-08-24 19:35 UTC by Pedro Sampaio
Modified: 2019-06-08 23:33 UTC (History)
45 users (show)

Fixed In Version: postgresql-jdbc 42.2.5
Doc Type: If docs needed, set a value
Doc Text:
A weakness was found in postgresql-jdbc. It was possible to provide an SSL Factory and not check the host name if a host name verifier was not provided to the driver. This could lead to a condition where a man-in-the-middle attacker could masquerade as a trusted server by providing a certificate for the wrong host, as long as it was signed by a trusted CA.
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

Description Pedro Sampaio 2018-08-24 19:35:23 UTC
# The Postgres JDBC driver does not perform hostname validation by default
## Vulnerability

* Product : PostgreSQL
* Component : client / JDBC Driver (Tested version:
org.postgresql:postgresql:jar:42.2.4)
* Common Weakness : 297 (Improper Validation of Certificate with Host
Mismatch)

The PostgreSQL JDBC driver (org.postgresql:postgresql) does not perform
hostname validation by default.

=> This means that SSL certificates of other hosts are blindly accepted as
long as they are trusted.

To exploit this vulnerability an attacker has to perform a
man-in-the-middle (MITM) attack between a Java application using the JDBC
driver and the PostgreSQL server it's connecting to.

=> TLS normally protects users and systems against MITM attacks, it cannot
if certificates from other trusted hosts are accepted by the client. This
is especially dangerous if users connect to their database via public
networks (e.g. Internet).

References:

https://www.postgresql.org/about/news/1883/

Comment 1 Pedro Sampaio 2018-08-24 19:35:48 UTC
Acknowledgments:

Name: the PostgreSQL project

Comment 2 Doran Moppert 2018-08-30 01:20:00 UTC
Upstream down-rated the severity of this issue on making it public.  The default configuration in fact would validate host names, but it was possible to provide an SSLFactory that would not.  In 42.2.5, the documentation and API has been improved for clarity to avoid this mistake.

Comment 3 Doran Moppert 2018-08-30 01:20:25 UTC
External References:

https://www.postgresql.org/about/news/1883/

Comment 5 Borja Tarraso 2018-10-15 08:44:45 UTC
Tower does not use any java stuff or any JDBC driver at all.

Comment 6 Richard Maciel Costa 2018-11-22 12:53:21 UTC
CloudForms does not use java (it isn't even installed in the appliance), hence it is not affected.

Comment 7 Cedric Buissart 🐶 2019-01-08 13:53:51 UTC
Created postgresql-jdbc tracking bugs for this issue:

Affects: fedora-all [bug 1664337]

Comment 9 Doran Moppert 2019-04-09 00:44:18 UTC
Mitigation:

Applications using postgresql-jdbc should have their SSL configuration reviewed to ensure that host name verification is not disabled and only trusted CAs are accepted.

This vulnerability only impacts usage of postgresql-jdbc with a non-default SSL Factory, provided by the `sslfactory` parameter. If this parameter is not given, the default LibPQFactory is used, which is not vulnerable.


Note You need to log in before you can comment on or make changes to this bug.