CVE-2020-9495: Archiva Injection Vulnerability

MODERATE
Advisory Identifier: GHSA-v83p-xwm9-v4g8
CVSS 5.3
CWE-74
Published
Advisory Summary

CVE-2020-9495 is a MODERATE (CVSS 5.3) injection vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting Archiva libraries in the Maven ecosystem. The issue involves injection in apache archiva. Remediation is available by upgrading affected packages to version 2.2.5.

CVE-2020-9495 at a Glance

CVE Identifier CVE-2020-9495
GHSA Identifier GHSA-v83p-xwm9-v4g8
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
Affected Product Archiva
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2020-9495

To remediate this vulnerability, upgrade all affected Archiva 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.archiva:archiva fixed: 2.2.5
<dependency>
    <groupId>org.apache.archiva</groupId>
    <artifactId>archiva</artifactId>
    <version>2.2.5</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.archiva

How to Check if You Are Affected

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

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

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

Note: The mvn dependency:tree -Dincludes=org.apache.archiva 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-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), where the product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. In Archiva, 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

Apache Archiva login service before 2.2.5 is vulnerable to LDAP injection. A attacker is able to retrieve user attribute data from the connected LDAP server by providing special values to the login form. With certain characters it is possible to modify the LDAP filter used to query the LDAP users. By measuring the response time for the login request, arbitrary attribute data can be retrieved from LDAP user objects.

CVE-2020-9495 Affected Archiva Versions

1 component(s)
Fixed Versions:
2.2.5
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.archiva:archiva
Maven
< 2.2.5
2.2.5

References

Frequently Asked Questions

What is CVE-2020-9495?
CVE-2020-9495 is a security vulnerability in Archiva involving Injection in Apache Archiva under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection').
Which Archiva versions are affected?
Affected versions include releases prior to 2.2.5 across affected packages: org.apache.archiva:archiva.
What version fixes CVE-2020-9495?
Upgrading to 2.2.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is archiva affected?
Yes, org.apache.archiva:archiva is affected in releases prior to 2.2.5. Upgrade your dependency to 2.2.5 or later.
What is the CVSS score of CVE-2020-9495?
CVE-2020-9495 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2020-9495?
CVE-2020-9495 is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.).
How can I check Maven dependencies for CVE-2020-9495?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.archiva'. 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-v83p-xwm9-v4g8",
  "modified" : "2021-05-11T22:24:26Z",
  "published" : "2022-02-10T23:06:22Z",
  "aliases" : [ "CVE-2020-9495" ],
  "summary" : "Injection in Apache Archiva",
  "details" : "Apache Archiva login service before 2.2.5 is vulnerable to LDAP injection. A attacker is able to retrieve user attribute data from the connected LDAP server by providing special values to the login form. With certain characters it is possible to modify the LDAP filter used to query the LDAP users. By measuring the response time for the login request, arbitrary attribute data can be retrieved from LDAP user objects.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.archiva:archiva"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.2.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-9495"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r576eaabe3f772c045ec832a0200252494a2ce3f188f59450dd8f9b6d@%3Cannounce.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r576eaabe3f772c045ec832a0200252494a2ce3f188f59450dd8f9b6d@%3Cdev.archiva.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r576eaabe3f772c045ec832a0200252494a2ce3f188f59450dd8f9b6d@%3Cusers.archiva.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r7ae580f700ade57b00641a70a5c639a3ba576893bbf7f9fd93bc491d@%3Cusers.maven.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "http://archiva.apache.org/security.html#CVE-2020-9495"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2020/06/19/1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-74" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-11T22:24:26Z",
    "nvd_published_at" : "2020-06-19T19:15:00Z"
  }
}