Vulnerabilities in pkg:maven/org.opennms.features/org.opennms.features.measurements

PACKAGE
Advisory Identifier: GHSA-c3mp-9vx3-2rvv
Advisory Summary

CVE-2021-3396 is a HIGH (CVSS 8.8) remote code execution vulnerability (CWE-863: Incorrect Authorization) affecting Opennms libraries in the Maven ecosystem. The issue involves opennms horizon rce via jexl2 expression. Remediation is available by upgrading affected packages to version 27.0.4.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.opennms.features/org.opennms.features.measurements

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.opennms.features/org.opennms.features.measurements. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-c3mp-9vx3-2rvv CVE-2021-3396 HIGH OpenNMS Horizon RCE via JEXL2 expression

CVE-2021-3396 at a Glance

CVE Identifier CVE-2021-3396
GHSA Identifier GHSA-c3mp-9vx3-2rvv
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-863: Incorrect Authorization
Affected Product Opennms
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 8.8

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

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

How to Fix CVE-2021-3396

To remediate this vulnerability, upgrade all affected Opennms 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.opennms:opennms fixed: 27.0.4
<dependency>
    <groupId>org.opennms</groupId>
    <artifactId>opennms</artifactId>
    <version>27.0.4</version>
</dependency>
org.opennms.features:org.opennms.features.measurements fixed: 27.0.4
<dependency>
    <groupId>org.opennms.features</groupId>
    <artifactId>org.opennms.features.measurements</artifactId>
    <version>27.0.4</version>
</dependency>
org.opennms:opennms-provision fixed: 27.0.4
<dependency>
    <groupId>org.opennms</groupId>
    <artifactId>opennms-provision</artifactId>
    <version>27.0.4</version>
</dependency>
org.opennms:opennms-util fixed: 27.0.4
<dependency>
    <groupId>org.opennms</groupId>
    <artifactId>opennms-util</artifactId>
    <version>27.0.4</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.opennms

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=org.opennms

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

Note: The mvn dependency:tree -Dincludes=org.opennms 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-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In Opennms, 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

OpenNMS Meridian 2016, 2017, 2018 before 2018.1.25, 2019 before 2019.1.16, and 2020 before 2020.1.5, Horizon 1.2 through 27.0.4, and Newts <1.5.3 has Incorrect Access Control, which allows local and remote code execution using JEXL expressions.

CVE-2021-3396 Affected Opennms Versions

4 component(s)
Fixed Versions:
27.0.4
Product / Package Ecosystem Affected Versions Fixed Version
org.opennms:opennms
Maven
≥ 16.0.0
< 27.0.4
27.0.4
org.opennms.features:org.opennms.features.measurements
Maven
≥ 16.0.0
< 27.0.4
27.0.4
org.opennms:opennms-provision
Maven
≥ 16.0.0
< 27.0.4
27.0.4
org.opennms:opennms-util
Maven
≥ 16.0.0
< 27.0.4
27.0.4

References

Frequently Asked Questions

What is CVE-2021-3396?
CVE-2021-3396 is a security vulnerability in Opennms involving OpenNMS Horizon RCE via JEXL2 expression under CWE-863: Incorrect Authorization.
Which Opennms versions are affected?
Affected versions include releases prior to 27.0.4 across affected packages: org.opennms:opennms, org.opennms.features:org.opennms.features.measurements, org.opennms:opennms-provision, org.opennms:opennms-util.
What version fixes CVE-2021-3396?
Upgrading to 27.0.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is opennms affected?
Yes, org.opennms:opennms is affected in releases prior to 27.0.4. Upgrade your dependency to 27.0.4 or later.
Is org.opennms.features.measurements affected?
Yes, org.opennms.features:org.opennms.features.measurements is affected in releases prior to 27.0.4. Upgrade your dependency to 27.0.4 or later.
What is the CVSS score of CVE-2021-3396?
CVE-2021-3396 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2021-3396?
CVE-2021-3396 is classified under CWE-863: Incorrect Authorization (The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.).
How can I check Maven dependencies for CVE-2021-3396?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.opennms'. 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-c3mp-9vx3-2rvv",
  "modified" : "2023-07-11T00:13:01Z",
  "published" : "2022-05-24T17:42:35Z",
  "aliases" : [ "CVE-2021-3396" ],
  "summary" : "OpenNMS Horizon RCE via JEXL2 expression",
  "details" : "OpenNMS Meridian 2016, 2017, 2018 before 2018.1.25, 2019 before 2019.1.16, and 2020 before 2020.1.5, Horizon 1.2 through 27.0.4, and Newts <1.5.3 has Incorrect Access Control, which allows local and remote code execution using JEXL expressions.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.opennms:opennms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "16.0.0"
      }, {
        "fixed" : "27.0.4"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 27.0.3"
    }
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.opennms.features:org.opennms.features.measurements"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "16.0.0"
      }, {
        "fixed" : "27.0.4"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 27.0.3"
    }
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.opennms:opennms-provision"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "16.0.0"
      }, {
        "fixed" : "27.0.4"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 27.0.3"
    }
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.opennms:opennms-util"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "16.0.0"
      }, {
        "fixed" : "27.0.4"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 27.0.3"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-3396"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/OpenNMS/opennms/pull/3281"
  }, {
    "type" : "WEB",
    "url" : "https://issues.opennms.org/browse/NMS-13103"
  }, {
    "type" : "WEB",
    "url" : "https://www.opennms.com/en/blog/2021-02-16-cve-2021-3396-full-security-disclosure"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-863" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-07-11T00:13:01Z",
    "nvd_published_at" : "2021-02-17T21:15:00Z"
  }
}