Vulnerabilities in pkg:maven/com.yahoo.elide/elide-datastore-aggregation

PACKAGE
Advisory Identifier: GHSA-8xpj-9j9g-fc9r
Advisory Summary

CVE-2022-24827 is a HIGH (CVSS 8.1) sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Elide datastore aggregation libraries in the Maven ecosystem. The issue involves sql injection in elide-datastore-aggregation. Remediation is available by upgrading affected packages to version 6.1.4.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/com.yahoo.elide/elide-datastore-aggregation

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/com.yahoo.elide/elide-datastore-aggregation. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-8xpj-9j9g-fc9r CVE-2022-24827 HIGH SQL Injection in elide-datastore-aggregation

CVE-2022-24827 at a Glance

CVE Identifier CVE-2022-24827
GHSA Identifier GHSA-8xpj-9j9g-fc9r
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product Elide datastore aggregation
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 8.1

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

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
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-2022-24827

To remediate this vulnerability, upgrade all affected Elide datastore aggregation dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

com.yahoo.elide:elide-datastore-aggregation fixed: 6.1.4
<dependency>
    <groupId>com.yahoo.elide</groupId>
    <artifactId>elide-datastore-aggregation</artifactId>
    <version>6.1.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=com.yahoo.elide

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=com.yahoo.elide

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

Note: The mvn dependency:tree -Dincludes=com.yahoo.elide 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-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In Elide datastore aggregation, 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

### Impact When leveraging the following together: - Elide Aggregation Data Store for Analytic Queries - Parameterized Columns (A column that requires a client provided parameter) - A parameterized column of type TEXT There is the potential for a hacker to provide a carefully crafted query that would bypass server side authorization filters through SQL injection. A recent patch to Elide 6.1.2 allowed the '-' character to be included in parameterized TEXT columns. This character can be interpreted as SQL comments ('--') and allow the attacker to remove the WHERE clause from the generated query and bypass authorization filters. ### Patches A [fix](https://github.com/yahoo/elide/pull/2581) is provided in [Elide 6.1.4](https://github.com/yahoo/elide/releases/tag/6.1.4). ### Workarounds The vulnerability only exists for parameterized columns of type TEXT and only for analytic queries (CRUD is not impacted). Workarounds include leveraging a different type of parameterized column (TIME, MONEY, etc) or not leveraging parameterized columns. ### For more information If you have any questions or comments about this advisory: * Open an issue in [elide](https://github.com/yahoo/elide) * Contact us in [Discord](https://discord.com/invite/3vh8ac57cc)

CVE-2022-24827 Affected Elide datastore aggregation Versions

1 component(s)
Fixed Versions:
6.1.4
Product / Package Ecosystem Affected Versions Fixed Version
com.yahoo.elide:elide-datastore-aggregation
Maven
≥ 6.1.3
< 6.1.4
All 1 versions
6.1.3
6.1.4

References

Frequently Asked Questions

What is CVE-2022-24827?
CVE-2022-24827 is a security vulnerability in Elide datastore aggregation involving SQL Injection in elide-datastore-aggregation under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which Elide datastore aggregation versions are affected?
Affected versions include releases prior to 6.1.4 across affected packages: com.yahoo.elide:elide-datastore-aggregation.
What version fixes CVE-2022-24827?
Upgrading to 6.1.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is elide-datastore-aggregation affected?
Yes, com.yahoo.elide:elide-datastore-aggregation is affected in releases prior to 6.1.4. Upgrade your dependency to 6.1.4 or later.
What is the CVSS score of CVE-2022-24827?
CVE-2022-24827 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2022-24827?
CVE-2022-24827 is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.).
How can I check Maven dependencies for CVE-2022-24827?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=com.yahoo.elide'. 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-8xpj-9j9g-fc9r",
  "modified" : "2022-04-18T22:19:44Z",
  "published" : "2022-04-08T22:43:17Z",
  "aliases" : [ "CVE-2022-24827" ],
  "summary" : "SQL Injection in elide-datastore-aggregation",
  "details" : "### Impact\nWhen leveraging the following together:\n\n- Elide Aggregation Data Store for Analytic Queries\n- Parameterized Columns (A column that requires a client provided parameter)\n- A parameterized column of type TEXT\n\nThere is the potential for a hacker to provide a carefully crafted query that would bypass server side authorization filters through SQL injection.  A recent patch to Elide 6.1.2 allowed the '-' character to be included in parameterized TEXT columns.  This character can be interpreted as SQL comments ('--') and allow the attacker to remove the WHERE clause from the generated query and bypass authorization filters.\n\n### Patches\nA [fix](https://github.com/yahoo/elide/pull/2581) is provided in [Elide 6.1.4](https://github.com/yahoo/elide/releases/tag/6.1.4).\n\n### Workarounds\nThe vulnerability only exists for parameterized columns of type TEXT and only for analytic queries (CRUD is not impacted).   Workarounds include leveraging a different type of parameterized column (TIME, MONEY, etc) or not leveraging parameterized columns.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [elide](https://github.com/yahoo/elide)\n* Contact us in [Discord](https://discord.com/invite/3vh8ac57cc)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.yahoo.elide:elide-datastore-aggregation"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.1.3"
      }, {
        "fixed" : "6.1.4"
      } ]
    } ],
    "versions" : [ "6.1.3" ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/yahoo/elide/security/advisories/GHSA-8xpj-9j9g-fc9r"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-24827"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/yahoo/elide/pull/2581"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/yahoo/elide"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/yahoo/elide/releases/tag/6.1.4"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-89" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-04-08T22:43:17Z",
    "nvd_published_at" : "2022-04-11T21:15:00Z"
  }
}