# CVE-2022-24827: SQL Injection in elide-datastore-aggregation

> Attackers can bypass server-side authorization filters via SQL injection in Elide's aggregation datastore when using parameterized TEXT columns.

- **Severity:** High 8.1 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 11 Apr 2022
- **Updated:** 23 Apr 2025
- **Also known as:** GHSA-8xpj-9j9g-fc9r

## What is CVE-2022-24827?

CVE-2022-24827 is a high-severity SQL injection vulnerability in yahoo elide, published on 11 Apr 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Elide is a Java library that lets you stand up a GraphQL/JSON-API web service with minimal effort. When leveraging the following together: Elide Aggregation Data Store for Analytic Queries, Parameterized Columns (A column that requires a client provided parameter), and 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. A fix is provided in Elide 6.1.4. 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.

Weakness: CWE-89 (Improper Neutralization of Special Elements used in an SQL Command)

## Which versions are affected by CVE-2022-24827?

2 open source packages ship an affected version, including com.yahoo.elide:elide-datastore-aggregation. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `com.yahoo.elide:elide-datastore-aggregation` | Maven | From 6.1.3 | 6.1.4 |
| `com.yahoo.elide:elide-datastore-aggregation` | Maven | From 6.1.3 | 6.1.4 |

Products: Elide Elide.

## How do I fix CVE-2022-24827?

Upgrade com.yahoo.elide:elide-datastore-aggregation to 6.1.4 or later.

## Is CVE-2022-24827 being exploited?

There is no known exploitation of CVE-2022-24827 in the wild and no public exploit code.

## Other vulnerabilities in yahoo elide

- [CVE-2020-5289](https://insights.sbomify.com/CVE-2020-5289/): Read permissions not enforced for client provided filter expressions in Elide http client (medium 6.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-24827 and fix it if it is affected.

What it is: CVE-2022-24827 is a high-severity SQL injection vulnerability in yahoo elide, published on 11 Apr 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2022-24827 in the wild and no public exploit code.

Affected packages and fixed versions:
- com.yahoo.elide:elide-datastore-aggregation (Maven): affected from 6.1.3; fixed in 6.1.4
- com.yahoo.elide:elide-datastore-aggregation (Maven): affected from 6.1.3; fixed in 6.1.4

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2022-24827/ (Markdown: https://insights.sbomify.com/CVE-2022-24827/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2022-24827
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-24827
- OSV: https://osv.dev/vulnerability/CVE-2022-24827

---
From sbomify Insights: https://insights.sbomify.com/CVE-2022-24827/
Summaries are generated and may contain mistakes; the official description above is the record.
