CVE-2012-5785: Axis2 Apache Axis2 Has Improper Input Vulnerability
MODERATECVE-2012-5785 is a MODERATE apache axis2 has improper input vulnerability (CWE-20: Improper Input Validation) affecting Axis2 libraries in the Maven ecosystem. The issue involves apache axis2 has improper input validation. Remediation is available by upgrading affected packages to version 1.8.0.
CVE-2012-5785 at a Glance
How to Fix CVE-2012-5785
To remediate this vulnerability, upgrade all affected Axis2 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>org.apache.axis2</groupId>
<artifactId>axis2</artifactId>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-http</artifactId>
<version>1.8.0</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.apache.axis2
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2012-5785, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.apache.axis2
Analyze the terminal output to locate any version of Axis2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.8.0), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.apache.axis2 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 Axis2, 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-5785 Affected Axis2 Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.axis2:axis2
|
Maven |
< 1.8.0
|
1.8.0
|
|
org.apache.axis2:axis2-transport-http
|
Maven |
< 1.8.0
|
1.8.0
|
References
Frequently Asked Questions
What is CVE-2012-5785?
Which Axis2 versions are affected?
What version fixes CVE-2012-5785?
Is axis2 affected?
Is axis2-transport-http affected?
What CWE is associated with CVE-2012-5785?
How can I check Maven dependencies for CVE-2012-5785?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wwq7-pxwc-p4rc",
"modified" : "2025-12-04T22:13:34Z",
"published" : "2022-05-17T01:38:56Z",
"aliases" : [ "CVE-2012-5785" ],
"summary" : "Apache Axis2 has Improper Input Validation",
"details" : "Apache Axis2/Java 1.7.9 and earlier 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.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.axis2:axis2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.8.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.axis2:axis2-transport-http"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.8.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2012-5785"
}, {
"type" : "WEB",
"url" : "https://exchange.xforce.ibmcloud.com/vulnerabilities/79830"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apache/axis-axis2-java-core"
}, {
"type" : "WEB",
"url" : "https://issues.apache.org/jira/browse/AXIS2-6018"
}, {
"type" : "WEB",
"url" : "http://www.cs.utexas.edu/~shmat/shmat_ccs12.pdf"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-07-12T22:27:16Z",
"nvd_published_at" : "2012-11-04T22:55:00Z"
}
}