# CVE-2026-27886: Strapi may leak sensitive data via relational filtering due to lack of query sanitization

> Unauthenticated attackers can extract admin reset tokens via relational filtering, enabling full administrative account takeover in Strapi.

- **Severity:** Critical 9.2 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/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:** 14 May 2026
- **Updated:** 14 May 2026
- **Also known as:** GHSA-rjg2-95x7-8qmx

## What is CVE-2026-27886?

CVE-2026-27886 is a critical vulnerability in strapi, published on 14 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Strapi is an open source headless content management system. Strapi versions starting in 4.0.0 and prior to 5.37.0 did not sufficiently sanitize query parameters when filtering content via relational fields. An unauthenticated attacker could use the `where` query parameter on any publicly-accessible content-type with an `updatedBy` (or other admin-relation) field to perform a boolean-oracle attack against private fields on the joined `admin_users` table, including the `resetPasswordToken` field. Extracting an admin reset token via this oracle made full administrative account takeover possible without authentication. When a filter such as `where[updatedBy][resetPasswordToken][$startsWith]=a` was applied to a public Content API endpoint, the underlying query generation performed a `LEFT JOIN` against the `admin_users` table and emitted a `WHERE` clause referencing the joined column. The query parameter sanitization layer did not block operator chains that traversed into relational target schemas the caller had no read permission on, allowing the response count to be used as a one-bit oracle on any admin-table field. The patch in version 5.37.0 introduces explicit query-parameter sanitization at the controller and service boundary via three new primitives: `strictParam`, `addQueryParams`, and `addBodyParams`. Operator chains that traverse into restricted relational targets are now rejected before reaching the database.

Weakness: CWE-943 (Improper Neutralization of Special Elements in Data Query Logic), CWE-22 (Improper Limitation of a Pathname to a Restricted Directory), CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor)

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

2 open source packages ship an affected version, including @strapi/strapi. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@strapi/strapi` | npm | From 4.0.0 | 5.37.0 |
| `@strapi/strapi` | npm | From 4.0.0 | 5.37.0 |

Products: Strapi Strapi.

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

Upgrade @strapi/strapi to 5.37.0 or later.

## Is CVE-2026-27886 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-27886 exists.

Public exploit code:

- Account takeover full PoC for CVE-2026-27886 in Strapi CMS (github_poc): https://github.com/thesw0rd/CVE-2026-27886-PoC-Account-Takeover
- Detect whether a Strapi instance is vulnerable to CVE-2026-27886 (unauthenticated boolean-oracle exfiltration of administrator secrets). (github_poc): https://github.com/BishopFox/CVE-2026-27886-check
- Strapi CVE-2026-27886. Leaking sensitive data via relational filtering due to lack of query sanitization (github_poc): https://github.com/EvtDanya/CVE-2026-27886
- Strapi <=5.36.x - Admin Credential Enumeration (nuclei)

## Other vulnerabilities in strapi

- [CVE-2023-22894](https://insights.sbomify.com/CVE-2023-22894/): Strapi Cleartext Storage of Sensitive Information (high 7.2, exploited in the wild)
- [CVE-2023-22621](https://insights.sbomify.com/CVE-2023-22621/): Strapi plugins vulnerable to Server-Side Template Injection and Remote Code Execution in the Users-Permissions Plugin (critical 10.0)
- [CVE-2022-27263](https://insights.sbomify.com/CVE-2022-27263/): Unrestricted Upload of File with Dangerous Type in Strapi (critical 9.8)
- [CVE-2020-27664](https://insights.sbomify.com/CVE-2020-27664/): Authorization bypass in Strapi (critical 9.8)
- [CVE-2019-18818](https://insights.sbomify.com/CVE-2019-18818/): Strapi allows unauthenticated attacker to reset admin password without valid reset token (critical 9.8)

## Fix prompt for AI coding agents

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

What it is: CVE-2026-27886 is a critical vulnerability in strapi, published on 14 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-27886 exists.

Affected packages and fixed versions:
- @strapi/strapi (npm): affected from 4.0.0; fixed in 5.37.0
- @strapi/strapi (npm): affected from 4.0.0; fixed in 5.37.0

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

## Sources

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

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