CVE-2012-5783: Commons httpclient Improper Certificate Validation Vulnerability
MODERATECVE-2012-5783 is a MODERATE improper certificate validation vulnerability (CWE-295: Improper Certificate Validation) affecting Commons httpclient libraries in the Maven ecosystem. The issue involves improper certificate validation in apache commons httpclient. Remediation is available in the latest vendor maintenance releases.
CVE-2012-5783 at a Glance
How to Fix CVE-2012-5783
To remediate this vulnerability, upgrade all affected Commons httpclient dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>Latest secure release</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=commons-httpclient
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2012-5783, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=commons-httpclient
Analyze the terminal output to locate any version of Commons httpclient in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The mvn dependency:tree -Dincludes=commons-httpclient 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-295: Improper Certificate Validation, where the product does not validate, or incorrectly validates, a certificate. In Commons httpclient, 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
CVE-2012-5783 Affected Commons httpclient Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
commons-httpclient:commons-httpclient
|
Maven |
≥ 3.0
|
|
References
Frequently Asked Questions
What is CVE-2012-5783?
Which Commons httpclient versions are affected?
What version fixes CVE-2012-5783?
Is commons-httpclient affected?
What CWE is associated with CVE-2012-5783?
How can I check Maven dependencies for CVE-2012-5783?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3832-9276-x7gf",
"modified" : "2024-11-05T22:28:04Z",
"published" : "2022-05-13T01:10:34Z",
"aliases" : [ "CVE-2012-5783" ],
"summary" : "Improper Certificate Validation in Apache Commons HttpClient",
"details" : "Apache Commons HttpClient 3.x, as used in Amazon Flexible Payments Service (FPS) merchant Java SDK and other products, does not verify that the server hostname matches a domain name in the subject's Common Name (CN) or subjectAltName field of the X.509 certificate, which allows man-in-the-middle attackers to spoof SSL servers via an arbitrary valid certificate.\n\nNote that the Commons HttpClient project is [end of life](https://hc.apache.org/httpclient-legacy/). It has been replaced by the Apache HttpComponents project in its [HttpClient](https://hc.apache.org/httpcomponents-client-5.4.x/) and [HttpCore](https://hc.apache.org/httpcomponents-core-5.3.x/) modules. CVE-2012-5783 has been patched in [v4.0](https://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient/4.0/) of the Apache HttpComponents HttpClient module.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "commons-httpclient:commons-httpclient"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "< 4.0"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2012-5783"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2017:0868"
}, {
"type" : "WEB",
"url" : "https://exchange.xforce.ibmcloud.com/vulnerabilities/79984"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apache/httpcomponents-client"
}, {
"type" : "WEB",
"url" : "https://issues.apache.org/jira/browse/HTTPCLIENT-1265"
}, {
"type" : "WEB",
"url" : "http://lists.opensuse.org/opensuse-updates/2013-02/msg00078.html"
}, {
"type" : "WEB",
"url" : "http://lists.opensuse.org/opensuse-updates/2013-04/msg00040.html"
}, {
"type" : "WEB",
"url" : "http://lists.opensuse.org/opensuse-updates/2013-04/msg00041.html"
}, {
"type" : "WEB",
"url" : "http://lists.opensuse.org/opensuse-updates/2013-04/msg00053.html"
}, {
"type" : "WEB",
"url" : "http://rhn.redhat.com/errata/RHSA-2013-0270.html"
}, {
"type" : "WEB",
"url" : "http://rhn.redhat.com/errata/RHSA-2013-0679.html"
}, {
"type" : "WEB",
"url" : "http://rhn.redhat.com/errata/RHSA-2013-0680.html"
}, {
"type" : "WEB",
"url" : "http://rhn.redhat.com/errata/RHSA-2013-0682.html"
}, {
"type" : "WEB",
"url" : "http://rhn.redhat.com/errata/RHSA-2013-1853.html"
}, {
"type" : "WEB",
"url" : "http://rhn.redhat.com/errata/RHSA-2014-0224.html"
}, {
"type" : "WEB",
"url" : "http://www.cs.utexas.edu/~shmat/shmat_ccs12.pdf"
}, {
"type" : "WEB",
"url" : "http://www.ubuntu.com/usn/USN-2769-1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-295" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-07-13T13:58:59Z",
"nvd_published_at" : "2012-11-04T22:55:00Z"
}
}