# CVE-2022-36084: cruddl vulnerable to AQL injection through flexSearch

> Attackers with read permissions can inject arbitrary AQL queries into ArangoDB via cruddl's flexSearch feature, potentially executing code or reading data.

- **Severity:** Critical 9.9 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 8 Sep 2022
- **Updated:** 23 Apr 2025
- **Also known as:** GHSA-qm4w-4995-vg7f

## What is CVE-2022-36084?

CVE-2022-36084 is a critical code injection vulnerability in AEB-labs cruddl, published on 8 Sep 2022. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

cruddl is software for creating a GraphQL API for a database, using the GraphQL SDL to model a schema. If cruddl starting with version 1.1.0 and prior to versions 2.7.0 and 3.0.2 is used to generate a schema that uses `@flexSearchFulltext`, users of that schema may be able to inject arbitrary AQL queries that will be forwarded to and executed by ArangoDB. Schemas that do not use `@flexSearchFulltext` are not affected. The attacker needs to have `READ` permission to at least one root entity type that has `@flexSearchFulltext` enabled. The issue has been fixed in version 3.0.2 and in version 2.7.0 of cruddl. As a workaround, users can temporarily remove `@flexSearchFulltext` from their schemas.

Weakness: CWE-943 (Improper Neutralization of Special Elements in Data Query Logic), CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component)

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

4 open source packages ship an affected version, including cruddl. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `cruddl` | npm | From 1.1.0 | 2.7.0 |
| `cruddl` | npm | From 1.1.0 | 2.7.0 |
| `cruddl` | npm | From 3.0.0 | 3.0.2 |
| `cruddl` | npm | From 3.0.0 | 3.0.2 |

Products: Aeb Cruddl.

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

Upgrade cruddl to a fixed version for your release line: 2.7.0 or 3.0.2.

## Is CVE-2022-36084 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2022-36084 is a critical code injection vulnerability in AEB-labs cruddl, published on 8 Sep 2022. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2022-36084 in the wild and no public exploit code.

Affected packages and fixed versions:
- cruddl (npm): affected from 1.1.0; fixed in 2.7.0
- cruddl (npm): affected from 1.1.0; fixed in 2.7.0
- cruddl (npm): affected from 3.0.0; fixed in 3.0.2
- cruddl (npm): affected from 3.0.0; fixed in 3.0.2

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-36084/ (Markdown: https://insights.sbomify.com/CVE-2022-36084/index.md)
```

## Sources

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

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