# CVE-2026-22814: Mass Assignment in AdonisJS Lucid Allows Overwriting Internal ORM State

> Attackers can overwrite internal ORM state via mass assignment, leading to unauthorized record modification and logic bypasses in AdonisJS applications.

- **Severity:** High 8.2 (`CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 13 Jan 2026
- **Updated:** 14 Jan 2026
- **Also known as:** GHSA-g5gc-h5hp-555f

## What is CVE-2026-22814?

CVE-2026-22814 is a high-severity vulnerability in adonisjs lucid, published on 13 Jan 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

@adonisjs/lucid is an SQL ORM for AdonisJS built on top of Knex. Prior to 21.8.2 and 22.0.0-next.6, there is a Mass Assignment vulnerability in AdonisJS Lucid which may allow a remote attacker who can influence data that is passed into Lucid model assignments to overwrite the internal ORM state. This may lead to logic bypasses and unauthorized record modification within a table or model. This affects @adonisjs/lucid through version 21.8.1 and 22.x pre-release versions prior to 22.0.0-next.6. This has been patched in @adonisjs/lucid versions 21.8.2 and 22.0.0-next.6.

Weakness: CWE-915 (Improperly Controlled Modification of Dynamically-Determined Object Attributes)

## Which versions are affected by CVE-2026-22814?

4 open source packages ship an affected version, including @adonisjs/lucid.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@adonisjs/lucid` | npm | All versions | 21.8.2 |
| `@adonisjs/lucid` | npm | All versions | 21.8.2 |
| `@adonisjs/lucid` | npm | From 22.0.0-next.0 | 22.0.0-next.6 |
| `@adonisjs/lucid` | npm | From 22.0.0-next.0 | 22.0.0-next.6 |

## How do I fix CVE-2026-22814?

Upgrade @adonisjs/lucid to a fixed version for your release line: 21.8.2 or 22.0.0-next.6.

## Is CVE-2026-22814 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-22814 and fix it if it is affected.

What it is: CVE-2026-22814 is a high-severity vulnerability in adonisjs lucid, published on 13 Jan 2026. 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-2026-22814 in the wild and no public exploit code.

Affected packages and fixed versions:
- @adonisjs/lucid (npm): affected all versions; fixed in 21.8.2
- @adonisjs/lucid (npm): affected all versions; fixed in 21.8.2
- @adonisjs/lucid (npm): affected from 22.0.0-next.0; fixed in 22.0.0-next.6
- @adonisjs/lucid (npm): affected from 22.0.0-next.0; fixed in 22.0.0-next.6

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

## Sources

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

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