CVE-2018-10936: Vulnerability in org.postgresql:pgjdbc-aggregate

Summary

19/10/2018
Yes i
Moderate
Not published

CVE-2018-10936: Moderate severity vulnerability that affects org.postgresql:pgjdbc-aggregate. Affects org.postgresql:pgjdbc-aggregate versions < 42.2.5. Fixed in 42.2.5. How to fix ↓

Also tracked for

The same CVE-2018-10936 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

org.postgresql:pgjdbc-aggregate is a Maven package that provides JDBC drivers for connecting to PostgreSQL databases. It allows Java applications to interact with PostgreSQL databases and execute SQL queries. This package is vulnerable to a moderate severity vulnerability.

Vulnerability Detail

The vulnerability (CVE-2018-10936) in org.postgresql:pgjdbc-aggregate allows an attacker to masquerade as a trusted server by providing a certificate for the wrong host, as long as it is signed by a trusted CA. This is possible because the package does not check the host name if a host name verifier is not provided to the driver. A man-in-the-middle attacker could exploit this weakness and intercept sensitive data or perform unauthorized actions.

How To Fix

Minimum fixed version

42.2.5

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If updating the package is not immediately feasible, a workaround is to manually implement host name verification in the application code. This can be done by providing a host name verifier to the driver that validates the server's host name against the expected host name. Here is an example of how to implement this workaround in Java:

import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLSession;

public class CustomHostnameVerifier implements HostnameVerifier {
    @Override
    public boolean verify(String hostname, SSLSession session) {
        // Implement custom host name verification logic
        return true; // Return true if the host name is valid
    }
}

// Set the custom host name verifier
CustomHostnameVerifier verifier = new CustomHostnameVerifier();
DriverManager.getConnection(url, properties, verifier);

Conclusion

In conclusion, org.postgresql:pgjdbc-aggregate is vulnerable to a moderate severity vulnerability that allows a man-in-the-middle attacker to impersonate a trusted server. It is recommended to update the package to version 42.2.5 or later to fix this vulnerability. If immediate update is not possible, implementing custom host name verification in the application code can serve as a temporary workaround. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.postgresql:pgjdbc-aggregate →

Share this vulnerability

FAQ

The vulnerability allows a man-in-the-middle attacker to impersonate a trusted server and potentially intercept sensitive data or perform unauthorized actions.

Versions prior to 42.2.5 are affected by this vulnerability.

Yes, a workaround is to implement custom host name verification in the application code.

To fix the vulnerability, update the org.postgresql:pgjdbc-aggregate package to version 42.2.5 or later.

How To Fix

Minimum fixed version

42.2.5

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback