CVE-2018-10936: Pgjdbc aggregate Pgjdbc-aggregate Vulnerability

MODERATE
Advisory Identifier: GHSA-568q-9fw5-28wf
CWE-297
Published
Advisory Summary

CVE-2018-10936 is a MODERATE pgjdbc-aggregate vulnerability (CWE-297: Improper Validation of Certificate with Host Mismatch) affecting Pgjdbc aggregate libraries in the Maven ecosystem. The issue involves pgjdbc-aggregate. Remediation is available by upgrading affected packages to version 42.2.5.

CVE-2018-10936 at a Glance

CVE Identifier CVE-2018-10936
GHSA Identifier GHSA-568q-9fw5-28wf
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-297: Improper Validation of Certificate with Host Mismatch
Affected Product Pgjdbc aggregate
Package Ecosystem Maven
Published Date
Last Updated

How to Fix CVE-2018-10936

To remediate this vulnerability, upgrade all affected Pgjdbc aggregate dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.postgresql:pgjdbc-aggregate fixed: 42.2.5
<dependency>
    <groupId>org.postgresql</groupId>
    <artifactId>pgjdbc-aggregate</artifactId>
    <version>42.2.5</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.postgresql

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2018-10936, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.postgresql

Analyze the terminal output to locate any version of Pgjdbc aggregate in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 42.2.5), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.postgresql command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-297: Improper Validation of Certificate with Host Mismatch, where the product communicates with a host that provides a certificate, but the product does not properly ensure that the certificate is actually associated with that host. In Pgjdbc aggregate, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A weakness was found in postgresql-jdbc before version 42.2.5. 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.

CVE-2018-10936 Affected Pgjdbc aggregate Versions

1 component(s)
Fixed Versions:
42.2.5
Product / Package Ecosystem Affected Versions Fixed Version
org.postgresql:pgjdbc-aggregate
Maven
< 42.2.5
42.2.5

References

Frequently Asked Questions

What is CVE-2018-10936?
CVE-2018-10936 is a security vulnerability in Pgjdbc aggregate involving pgjdbc-aggregate under CWE-297: Improper Validation of Certificate with Host Mismatch.
Which Pgjdbc aggregate versions are affected?
Affected versions include releases prior to 42.2.5 across affected packages: org.postgresql:pgjdbc-aggregate.
What version fixes CVE-2018-10936?
Upgrading to 42.2.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pgjdbc-aggregate affected?
Yes, org.postgresql:pgjdbc-aggregate is affected in releases prior to 42.2.5. Upgrade your dependency to 42.2.5 or later.
What CWE is associated with CVE-2018-10936?
CVE-2018-10936 is classified under CWE-297: Improper Validation of Certificate with Host Mismatch (The product communicates with a host that provides a certificate, but the product does not properly ensure that the certificate is actually associated with that host.).
How can I check Maven dependencies for CVE-2018-10936?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.postgresql'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-568q-9fw5-28wf",
  "modified" : "2020-06-16T21:00:08Z",
  "published" : "2018-10-19T16:53:33Z",
  "aliases" : [ "CVE-2018-10936" ],
  "summary" : "Moderate severity vulnerability that affects org.postgresql:pgjdbc-aggregate",
  "details" : "A weakness was found in postgresql-jdbc before version 42.2.5. 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.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.postgresql:pgjdbc-aggregate"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "42.2.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-10936"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-10936"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-568q-9fw5-28wf"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/9317fd092b257a0815434b116a8af8daea6e920b6673f4fd5583d5fe@%3Ccommits.druid.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://www.postgresql.org/about/news/1883"
  }, {
    "type" : "WEB",
    "url" : "http://www.securityfocus.com/bid/105220"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-297" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:00:08Z",
    "nvd_published_at" : null
  }
}