CVE-2012-6153: Httpclient Httpclient Vulnerability

HIGH
Advisory Identifier: GHSA-2x83-r56g-cv47
CWE-20
Published
Advisory Summary

CVE-2012-6153 is a HIGH httpclient vulnerability (CWE-20: Improper Input Validation) affecting Httpclient libraries in the Maven ecosystem. The issue involves httpclient. Remediation is available by upgrading affected packages to version 4.2.3.

CVE-2012-6153 at a Glance

CVE Identifier CVE-2012-6153
GHSA Identifier GHSA-2x83-r56g-cv47
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-20: Improper Input Validation
Affected Product Httpclient
Package Ecosystem Maven
Published Date
Last Updated

How to Fix CVE-2012-6153

To remediate this vulnerability, upgrade all affected 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.

org.apache.httpcomponents:httpclient fixed: 4.2.3
<dependency>
    <groupId>org.apache.httpcomponents</groupId>
    <artifactId>httpclient</artifactId>
    <version>4.2.3</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.apache.httpcomponents

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=org.apache.httpcomponents

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

Note: The mvn dependency:tree -Dincludes=org.apache.httpcomponents 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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In 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

http/conn/ssl/AbstractVerifier.java in Apache Commons HttpClient before 4.2.3 does not properly 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 a certificate with a subject that specifies a common name in a field that is not the CN field. NOTE: this issue exists because of an incomplete fix for CVE-2012-5783.

CVE-2012-6153 Affected Httpclient Versions

1 component(s)
Fixed Versions:
4.2.3
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.httpcomponents:httpclient
Maven
< 4.2.3
4.2.3

References

NVD — CVE-2012-6153 NVD
https://nvd.nist.gov/vuln/detail/CVE-2012-6153
Security Fix Commit FIX COMMIT
https://github.com/apache/httpcomponents-client/commit/6e14fc146a66e0f3eb362f45f95d1a58ee18886a
Security Fix Commit FIX COMMIT
https://github.com/apache/httpcomponents-client/commit/b930227f907af1198765fc47beabbddae344ca7b
access.redhat.com/solutions/1165533 WEB
https://access.redhat.com/solutions/1165533
bugzilla.redhat.com/show_bug.cgi WEB
https://bugzilla.redhat.com/show_bug.cgi?id=1129916
GitHub Advisory / Wiki ADVISORY
https://github.com/advisories/GHSA-2x83-r56g-cv47
h20566.www2.hpe.com/portal/site/hpsc/pu... WEB
https://h20566.www2.hpe.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c05103564
rhn.redhat.com/errata/rhsa-2014-10... WEB
http://rhn.redhat.com/errata/RHSA-2014-1098.html
rhn.redhat.com/errata/rhsa-2014-18... WEB
http://rhn.redhat.com/errata/RHSA-2014-1833.html
rhn.redhat.com/errata/rhsa-2014-18... WEB
http://rhn.redhat.com/errata/RHSA-2014-1834.html
rhn.redhat.com/errata/rhsa-2014-18... WEB
http://rhn.redhat.com/errata/RHSA-2014-1835.html
rhn.redhat.com/errata/rhsa-2014-18... WEB
http://rhn.redhat.com/errata/RHSA-2014-1836.html
rhn.redhat.com/errata/rhsa-2014-18... WEB
http://rhn.redhat.com/errata/RHSA-2014-1891.html
rhn.redhat.com/errata/rhsa-2014-18... WEB
http://rhn.redhat.com/errata/RHSA-2014-1892.html
rhn.redhat.com/errata/rhsa-2015-01... WEB
http://rhn.redhat.com/errata/RHSA-2015-0125.html
rhn.redhat.com/errata/rhsa-2015-01... WEB
http://rhn.redhat.com/errata/RHSA-2015-0158.html
rhn.redhat.com/errata/rhsa-2015-06... WEB
http://rhn.redhat.com/errata/RHSA-2015-0675.html
rhn.redhat.com/errata/rhsa-2015-07... WEB
http://rhn.redhat.com/errata/RHSA-2015-0720.html
rhn.redhat.com/errata/rhsa-2015-07... WEB
http://rhn.redhat.com/errata/RHSA-2015-0765.html
rhn.redhat.com/errata/rhsa-2015-08... WEB
http://rhn.redhat.com/errata/RHSA-2015-0850.html
rhn.redhat.com/errata/rhsa-2015-08... WEB
http://rhn.redhat.com/errata/RHSA-2015-0851.html
rhn.redhat.com/errata/rhsa-2015-18... WEB
http://rhn.redhat.com/errata/RHSA-2015-1888.html
svn.apache.org/viewvc WEB
http://svn.apache.org/viewvc?view=revision&revision=1411705
www.ubuntu.com/usn/usn-2769-1 WEB
http://www.ubuntu.com/usn/USN-2769-1

Frequently Asked Questions

What is CVE-2012-6153?
CVE-2012-6153 is a security vulnerability in Httpclient involving httpclient under CWE-20: Improper Input Validation.
Which Httpclient versions are affected?
Affected versions include releases prior to 4.2.3 across affected packages: org.apache.httpcomponents:httpclient.
What version fixes CVE-2012-6153?
Upgrading to 4.2.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is httpclient affected?
Yes, org.apache.httpcomponents:httpclient is affected in releases prior to 4.2.3. Upgrade your dependency to 4.2.3 or later.
What CWE is associated with CVE-2012-6153?
CVE-2012-6153 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check Maven dependencies for CVE-2012-6153?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.httpcomponents'. 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-2x83-r56g-cv47",
  "modified" : "2024-03-05T18:49:27Z",
  "published" : "2018-10-17T00:05:15Z",
  "aliases" : [ "CVE-2012-6153" ],
  "summary" : "Improper certificate validation in org.apache.httpcomponents:httpclient",
  "details" : "http/conn/ssl/AbstractVerifier.java in Apache Commons HttpClient before 4.2.3 does not properly 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 a certificate with a subject that specifies a common name in a field that is not the CN field. NOTE: this issue exists because of an incomplete fix for CVE-2012-5783.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.httpcomponents:httpclient"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.2.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2012-6153"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/httpcomponents-client/commit/6e14fc146a66e0f3eb362f45f95d1a58ee18886a"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/httpcomponents-client/commit/b930227f907af1198765fc47beabbddae344ca7b"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/solutions/1165533"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=1129916"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-2x83-r56g-cv47"
  }, {
    "type" : "WEB",
    "url" : "https://h20566.www2.hpe.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c05103564"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2014-1098.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2014-1833.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2014-1834.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2014-1835.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2014-1836.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2014-1891.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2014-1892.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2015-0125.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2015-0158.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2015-0675.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2015-0720.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2015-0765.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2015-0850.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2015-0851.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2015-1888.html"
  }, {
    "type" : "WEB",
    "url" : "http://svn.apache.org/viewvc?view=revision&revision=1411705"
  }, {
    "type" : "WEB",
    "url" : "http://www.ubuntu.com/usn/USN-2769-1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T20:53:18Z",
    "nvd_published_at" : null
  }
}