Vulnerabilities in pkg:maven/org.apache.unomi/unomi

PACKAGE
Advisory Identifier: GHSA-rm7f-mpcj-w4f6
Advisory Summary

CVE-2021-31164 is a HIGH (CVSS 7.5) command injection vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting Unomi libraries in the Maven ecosystem. The issue involves command injection in apache unomi. Remediation is available by upgrading affected packages to version 1.5.5.

3 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.apache.unomi/unomi

3 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-rm7f-mpcj-w4f6 CVE-2021-31164 HIGH Command injection in Apache Unomi
GHSA-v6fq-q792-j46j CVE-2020-11975 HIGH Improper Input Validation in Apache Unomi
GHSA-xp5j-wj4h-2jq9 CVE-2020-13942 CRITICAL Injection and Improper Input Validation in Apache Unomi

CVE-2021-31164 at a Glance

CVE Identifier CVE-2021-31164
GHSA Identifier GHSA-rm7f-mpcj-w4f6
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
Affected Product Unomi
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 7.5

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:N/I:H/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 None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2021-31164

To remediate this vulnerability, upgrade all affected Unomi 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.unomi:unomi fixed: 1.5.5
<dependency>
    <groupId>org.apache.unomi</groupId>
    <artifactId>unomi</artifactId>
    <version>1.5.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.unomi

How to Check if You Are Affected

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

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

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

Note: The mvn dependency:tree -Dincludes=org.apache.unomi 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 Unomi, 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 Unomi prior to version 1.5.5 allows CRLF log injection because of the lack of escaping in the log statements.

CVE-2021-31164 Affected Unomi Versions

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

References

Frequently Asked Questions

What is CVE-2021-31164?
CVE-2021-31164 is a security vulnerability in Unomi involving Command injection in Apache Unomi under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection').
Which Unomi versions are affected?
Affected versions include releases prior to 1.5.5 across affected packages: org.apache.unomi:unomi.
What version fixes CVE-2021-31164?
Upgrading to 1.5.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is unomi affected?
Yes, org.apache.unomi:unomi is affected in releases prior to 1.5.5. Upgrade your dependency to 1.5.5 or later.
What is the CVSS score of CVE-2021-31164?
CVE-2021-31164 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2021-31164?
CVE-2021-31164 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-2021-31164?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.unomi'. 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-rm7f-mpcj-w4f6",
  "modified" : "2021-05-19T22:11:25Z",
  "published" : "2021-06-16T17:17:24Z",
  "aliases" : [ "CVE-2021-31164" ],
  "summary" : "Command injection in Apache Unomi",
  "details" : "Apache Unomi prior to version 1.5.5 allows CRLF log injection because of the lack of escaping in the log statements.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.unomi:unomi"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.5.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-31164"
  }, {
    "type" : "WEB",
    "url" : "http://unomi.apache.org/security/cve-2021-31164"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-74" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-19T22:11:25Z",
    "nvd_published_at" : "2021-05-04T07:15:00Z"
  }
}