CVE-2012-5783: Improper Certificate Validation in Apache HttpClient

Summary

13/05/2022
No i
Moderate
Not published

CVE-2012-5783: Improper Certificate Validation in Apache Commons HttpClient. Affects commons-httpclient:commons-httpclient versions >= 3.0. No fix is published. How to fix ↓

Also tracked for

The same CVE-2012-5783 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Apache HttpClient is a widely used Java library for making HTTP requests. It provides a comprehensive set of features for interacting with HTTP servers. The vulnerability identified as CVE-2012-5783 affects versions 3.x of Apache Commons HttpClient, which is used in various products including the Amazon Flexible Payments Service (FPS) merchant Java SDK. This vulnerability arises from the library's failure to properly validate server certificates, allowing attackers to perform man-in-the-middle attacks by spoofing SSL servers with arbitrary valid certificates.

Vulnerability Detail

The vulnerability in Apache HttpClient arises from the library's failure to verify that the server hostname matches a domain name in the subject's Common Name (CN) or subjectAltName field of the X.509 certificate. This oversight enables attackers to intercept and manipulate the communication between the client and server, potentially leading to unauthorized access, data leakage, or other malicious activities. The impact of this vulnerability can be significant, as it undermines the security of SSL/TLS connections and compromises the integrity and confidentiality of sensitive information transmitted over the network.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

There is no specific workaround provided for this vulnerability. However, developers can consider implementing additional certificate validation checks in their code to mitigate the risk of man-in-the-middle attacks. This can involve verifying the server certificate's Common Name (CN) or subjectAltName field against the expected domain name. It is important to note that such custom checks should be implemented with caution and in accordance with best practices to avoid introducing other security vulnerabilities.

Conclusion

In conclusion, the CVE-2012-5783 vulnerability in Apache HttpClient exposes applications to the risk of man-in-the-middle attacks by failing to properly validate server certificates. To mitigate this vulnerability, it is crucial to upgrade to a fixed version of the library and implement robust certificate validation checks. For further assistance and support in addressing this vulnerability, please contact DevNack.com.

See every vulnerability recorded for commons-httpclient:commons-httpclient →

Share this vulnerability

FAQ

Apache HttpClient is a Java library for making HTTP requests. It provides a convenient and flexible API for interacting with HTTP servers.

The vulnerability allows attackers to spoof SSL servers and perform man-in-the-middle attacks, compromising the security of SSL/TLS connections and potentially leading to unauthorized access or data leakage.

Versions 3.x of Apache Commons HttpClient are affected by this vulnerability.

Yes, the vulnerability has been fixed in version 4.0 and later of Apache HttpClient.

To protect your application, it is recommended to upgrade to a fixed version of Apache HttpClient (4.0 or later) and ensure proper validation of server certificates.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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