Description
Strapi is an open source headless content management system. In versions on the 4.x branch prior to 4.26.1 and on the 5.x branch prior to 5.33.2, a database-query injection vulnerability existed in the Strapi Content-Type Builder write API. An authenticated administrator could inject arbitrary database statements through the `column.defaultTo` attribute when creating or modifying a content type. Setting `defaultTo` as a tuple `[value, { isRaw: true }]` caused the value to be passed directly into Knex's `db.connection.raw()` during schema migration without sanitization, allowing arbitrary statement execution at the database layer. Depending on the database engine, this enabled arbitrary file read via database utility functions, denial of service via forced server crash on schema-migration error, and on engines that permit external program execution, remote code execution against the database server. The patch in versions 4.26.1 and 5.33.2 addresses this by restricting all Content-Type Builder write APIs to development mode only. Production deployments running v5.33.2 or later return 404 for requests against `/content-type-builder/content-types` and related endpoints, removing the network-reachable attack surface entirely.
Published: 2026-05-14
Score: 9.3 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Strapi versions on the 4.x branch before 4.26.1 and on the 5.x branch before 5.33.2 contain a database‑query injection flaw in the Content‑Type Builder write API. An authenticated administrator can supply an arbitrary value for the `column.defaultTo` attribute, specifying a tuple that instructs Knex to send the supplied SQL directly to the database with no sanitization. This permits the attacker to execute arbitrary SQL statements at the database layer. Depending on the database engine, consequences include reading arbitrary files, causing a denial‑of‑service crash during schema migration, or executing external programs, which effectively is remote code execution against the database server.

Affected Systems

The vulnerable products are Strapi open‑source CMS, specifically the strapi/content‑type‑builder and strapi:strapi modules. 4.x releases before 4.26.1 and 5.x releases before 5.33.2 are impacted; later releases (4.26.1, 5.33.2 and beyond) contain a mitigated implementation that restricts write APIs to development mode only and returns 404 for privileged endpoints in production, eliminating the attack surface.

Risk and Exploitability

The CVSS score of 9.3 indicates a critical severity. The EPSS score is not available, but the lack of mitigation in many deployments and the possibility to exploit remote database access elevate the risk. The flaw is listed in no KEV catalog yet, but the high CVSS and real‑world impact potential make it a top priority. Since the attack requires administrator credentials and relies on direct API calls to the Content‑Type Builder, it is likely to be executed by insiders or compromised admin accounts, but it can also be leveraged by an attacker who gains those credentials. The removal of the network‑reachable API surface in recent releases reduces likelihood unless production environments still expose the endpoints.

Generated by OpenCVE AI on May 14, 2026 at 20:26 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to Strapi 4.26.1 or later on the 4.x branch, or to 5.33.2 or later on the 5.x branch.
  • If an upgrade is not feasible, block all requests to /content-type-builder/* endpoints in production, effectively disabling the vulnerable API.
  • Ensure that only the development mode of the Content‑Type Builder API is used; disable write access in production configurations.
  • Apply the principle of least privilege to database users so that even if injection is possible, the executed statements cannot access sensitive files or run external programs.

Generated by OpenCVE AI on May 14, 2026 at 20:26 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-3xcq-8mjw-h6mx Strapi Vulnerable to SQL Injection in Content Type Builder
History

Sat, 16 May 2026 03:30:00 +0000

Type Values Removed Values Added
First Time appeared Strapi
Strapi strapi
CPEs cpe:2.3:a:strapi:strapi:*:*:*:*:*:node.js:*:*
Vendors & Products Strapi
Strapi strapi
Metrics cvssV3_1

{'score': 7.2, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H'}


Thu, 14 May 2026 19:00:00 +0000

Type Values Removed Values Added
Description Strapi is an open source headless content management system. In versions on the 4.x branch prior to 4.26.1 and on the 5.x branch prior to 5.33.2, a database-query injection vulnerability existed in the Strapi Content-Type Builder write API. An authenticated administrator could inject arbitrary database statements through the `column.defaultTo` attribute when creating or modifying a content type. Setting `defaultTo` as a tuple `[value, { isRaw: true }]` caused the value to be passed directly into Knex's `db.connection.raw()` during schema migration without sanitization, allowing arbitrary statement execution at the database layer. Depending on the database engine, this enabled arbitrary file read via database utility functions, denial of service via forced server crash on schema-migration error, and on engines that permit external program execution, remote code execution against the database server. The patch in versions 4.26.1 and 5.33.2 addresses this by restricting all Content-Type Builder write APIs to development mode only. Production deployments running v5.33.2 or later return 404 for requests against `/content-type-builder/content-types` and related endpoints, removing the network-reachable attack surface entirely.
Title Strapi Vulnerable to SQL Injection in Content Type Builder
Weaknesses CWE-89
References
Metrics cvssV4_0

{'score': 9.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:N/SC:H/SI:H/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-05-14T19:45:29.894Z

Reserved: 2026-01-07T21:50:39.533Z

Link: CVE-2026-22599

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Analyzed

Published: 2026-05-14T19:16:29.650

Modified: 2026-05-16T03:25:18.087

Link: CVE-2026-22599

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-14T20:30:04Z

Weaknesses