CVE-2020-1953: Commons configuration2 Remote Code Execution Vulnerability

CRITICAL
Advisory Identifier: GHSA-7qx4-pp76-vrqh
CVSS 10.0
CWE-20
Published
Advisory Summary

CVE-2020-1953 is a CRITICAL (CVSS 10.0) remote code execution vulnerability (CWE-20: Improper Input Validation) affecting Commons configuration2 libraries in the Maven ecosystem. The issue involves remote code execution in apache commons configuration. Remediation is available by upgrading affected packages to version 2.7.

CVE-2020-1953 at a Glance

CVE Identifier CVE-2020-1953
GHSA Identifier GHSA-7qx4-pp76-vrqh
Severity CRITICAL
CVSS v3.1 Base Score 10.0
CWE Classification CWE-20: Improper Input Validation
Affected Product Commons configuration2
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 10.0

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:C/C:H/I:H/A:H).

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

How to Fix CVE-2020-1953

To remediate this vulnerability, upgrade all affected Commons configuration2 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.commons:commons-configuration2 fixed: 2.7
<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-configuration2</artifactId>
    <version>2.7</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.commons

How to Check if You Are Affected

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

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

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

Note: The mvn dependency:tree -Dincludes=org.apache.commons 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 Commons configuration2, 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 Commons Configuration uses a third-party library to parse YAML files which by default allows the instantiation of classes if the YAML includes special statements. Apache Commons Configuration versions 2.2, 2.3, 2.4, 2.5, 2.6 did not change the default settings of this library. So if a YAML file was loaded from an untrusted source, it could therefore load and execute code out of the control of the host application.

CVE-2020-1953 Affected Commons configuration2 Versions

1 component(s)
Fixed Versions:
2.7
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.commons:commons-configuration2
Maven
≥ 2.2
< 2.7
2.7

References

Frequently Asked Questions

What is CVE-2020-1953?
CVE-2020-1953 is a security vulnerability in Commons configuration2 involving Remote code execution in Apache Commons Configuration under CWE-20: Improper Input Validation.
Which Commons configuration2 versions are affected?
Affected versions include releases prior to 2.7 across affected packages: org.apache.commons:commons-configuration2.
What version fixes CVE-2020-1953?
Upgrading to 2.7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is commons-configuration2 affected?
Yes, org.apache.commons:commons-configuration2 is affected in releases prior to 2.7. Upgrade your dependency to 2.7 or later.
What is the CVSS score of CVE-2020-1953?
CVE-2020-1953 has a CVSS v3.1 base score of 10.0 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2020-1953?
CVE-2020-1953 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-2020-1953?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.commons'. 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-7qx4-pp76-vrqh",
  "modified" : "2021-07-28T18:49:53Z",
  "published" : "2020-05-21T19:08:08Z",
  "aliases" : [ "CVE-2020-1953" ],
  "summary" : "Remote code execution in Apache Commons Configuration",
  "details" : "Apache Commons Configuration uses a third-party library to parse YAML files which by default allows the instantiation of classes if the YAML includes special statements. Apache Commons Configuration versions 2.2, 2.3, 2.4, 2.5, 2.6 did not change the default settings of this library. So if a YAML file was loaded from an untrusted source, it could therefore load and execute code out of the control of the host application.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.commons:commons-configuration2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.2"
      }, {
        "fixed" : "2.7"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-1953"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/commons-configuration/commit/add7375cf37fd316d4838c6c56b054fc293b4641"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/d0e00f2e147a9e9b13a6829133092f349b2882bf6860397368a52600@%3Cannounce.tomcat.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r16a2e949e35780c8974cf66104e812410f3904f752df6b66bf292269@%3Ccommits.servicecomb.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rde2186ad6ac0d6ed8d51af7509244adcf1ce0f9a3b7e1d1dd3b64676@%3Ccommits.camel.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuoct2020.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-05-21T17:12:19Z",
    "nvd_published_at" : "2020-03-13T15:15:00Z"
  }
}