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.
An attacker sends a GET request to a publicly accessible Content API endpoint, passing a `where` parameter pointing to a relational field (e.g., `updatedBy`), and then nesting a reference to a private field of the `admin_users` table, such as `where[updatedBy][resetPasswordToken][$startsWith]=a`. The sanitization layer did not block operator strings passing to relationship target schemas that the caller had no read permissions for. As a result, the database executed a `LEFT JOIN` on the `admin_users` table and emitted a `WHERE` clause referencing the private field — the number of returned results acted as a one-bit boolean oracle. By repeating queries with different prefixes, an attacker could brute-force the complete value of the administrator's password reset token and reset the administrator's password.
An unauthenticated attacker can read the password reset token of any administrator account and perform complete account takeover of an administrative account without any credentials.
Strapi should be updated to version 5.37.0 or later. Version 5.37.0 introduces explicit sanitization of query parameters at the controller and service boundary using new primitives `strictParam`, `addQueryParams`, and `addBodyParams`, which reject operator strings passing to restricted relational targets before reaching the database. If immediate update is not possible, consider restricting access to public Content API endpoints at the firewall or reverse proxy level.
Strapi versions from 4.0.0 to (but not including) 5.37.0
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:XStrapi
APPStrapi4.0.0 – 5.37.0 (excl.)
Related vulnerabilities
SQL Injection w Strapi Content-Type Builder — możliwe RCE i odczyt plików
Arbitrary file upload umożliwiający RCE w Strapi v4.1.5
Nieautoryzowany endpoint proxy w Strapi — podatność SSRF/proxy
Błędna obsługa resetowania hasła w Strapi przed v3.0.0-beta.17.5
Strapi is an open-source headless content management system. In versions from 5.0.0 to before 5.5.2, the looku...