Vulnerabilities in pkg:npm/@strapi/content-type-builder

PACKAGE
Advisory Identifier: GHSA-3xcq-8mjw-h6mx
Advisory Summary

CVE-2026-22599 is a CRITICAL sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting @strapi/content type builder libraries in the npm ecosystem. The issue involves strapi vulnerable to sql injection in content type builder. Remediation is available by upgrading affected packages to version 5.33.2, 4.26.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@strapi/content-type-builder

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@strapi/content-type-builder. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-3xcq-8mjw-h6mx CVE-2026-22599 CRITICAL Strapi Vulnerable to SQL Injection in Content Type Builder

CVE-2026-22599 at a Glance

CVE Identifier CVE-2026-22599
GHSA Identifier GHSA-3xcq-8mjw-h6mx
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product @strapi/content type builder
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-22599

To remediate this vulnerability, upgrade all affected @strapi/content type builder dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@strapi/content-type-builder fixed: 5.33.2
npm install @strapi/content-type-builder@5.33.2
@strapi/plugin-content-type-builder fixed: 4.26.1
npm install @strapi/plugin-content-type-builder@4.26.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @strapi/content-type-builder

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-22599, inspect your project dependencies using npm:

npm ls @strapi/content-type-builder

Analyze the terminal output to locate any version of @strapi/content type builder in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.33.2), your application is affected.

Note: The npm ls @strapi/content-type-builder command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In @strapi/content type builder, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary of CVE-2026-22599 Vulnerability Details - CVE: CVE-2026-22599 - CVSS v3.1 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` (9.3 — Critical) - Affected Versions: `@strapi/content-type-builder` <=5.33.1 (v5), `@strapi/plugin-content-type-builder` <=4.26.0 (v4) - How to Patch: Immediately update your Strapi to >=5.33.2 (v5) or >=4.26.1 (v4) ### Description of CVE-2026-22599 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 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. ### IoC's for CVE-2026-22599 Indicators that an instance running an unpatched version may have been exploited: - HTTP access logs containing POST or PUT requests to `/content-type-builder/content-types` from a non-internal source. Regex pattern: `(POST|PUT)\s+/content-type-builder/` - Database server logs containing unexpected DEFAULT clause values that reference filesystem-access or program-execution helper functions of your database engine - Strapi server crashes immediately following a content-type creation or update, observed as the Node process exiting during the schema-migration step - Files appearing under unexpected paths on the database host that match content-type DEFAULT values from the application - Newly-created content-types named or shaped to extract specific data (attribute names like `passwd`, `etc`, `env`, `config`)

CVE-2026-22599 Affected @strapi/content type builder Versions

2 component(s)
Fixed Versions:
5.33.24.26.1
Product / Package Ecosystem Affected Versions Fixed Version
@strapi/content-type-builder
npm
≥ 5.0.0
< 5.33.2
5.33.2
@strapi/plugin-content-type-builder
npm
≥ 4.0.0
< 4.26.1
4.26.1

References

Frequently Asked Questions

What is CVE-2026-22599?
CVE-2026-22599 is a security vulnerability in @strapi/content type builder involving Strapi Vulnerable to SQL Injection in Content Type Builder under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which @strapi/content type builder versions are affected?
Affected versions include releases prior to 5.33.2, 4.26.1 across affected packages: @strapi/content-type-builder, @strapi/plugin-content-type-builder.
What version fixes CVE-2026-22599?
Upgrading to 5.33.2, 4.26.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @strapi/content-type-builder affected?
Yes, @strapi/content-type-builder is affected in releases prior to 5.33.2. Upgrade your dependency to 5.33.2 or later.
Is @strapi/plugin-content-type-builder affected?
Yes, @strapi/plugin-content-type-builder is affected in releases prior to 4.26.1. Upgrade your dependency to 4.26.1 or later.
What CWE is associated with CVE-2026-22599?
CVE-2026-22599 is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.).
How can I check npm dependencies for CVE-2026-22599?
Run the dependency tree command: 'npm ls @strapi/content-type-builder'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-3xcq-8mjw-h6mx",
  "modified" : "2026-05-15T23:44:24Z",
  "published" : "2026-05-13T20:02:36Z",
  "aliases" : [ "CVE-2026-22599" ],
  "summary" : "Strapi Vulnerable to SQL Injection in Content Type Builder",
  "details" : "### Summary of CVE-2026-22599 Vulnerability Details\n\n- CVE: CVE-2026-22599\n- CVSS v3.1 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` (9.3 — Critical)\n- Affected Versions: `@strapi/content-type-builder` <=5.33.1 (v5), `@strapi/plugin-content-type-builder` <=4.26.0 (v4)\n- How to Patch: Immediately update your Strapi to >=5.33.2 (v5) or >=4.26.1 (v4)\n\n### Description of CVE-2026-22599\n\nA 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.\n\nThe patch 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.\n\n### IoC's for CVE-2026-22599\n\nIndicators that an instance running an unpatched version may have been exploited:\n\n- HTTP access logs containing POST or PUT requests to `/content-type-builder/content-types` from a non-internal source. Regex pattern: `(POST|PUT)\\s+/content-type-builder/`\n- Database server logs containing unexpected DEFAULT clause values that reference filesystem-access or program-execution helper functions of your database engine\n- Strapi server crashes immediately following a content-type creation or update, observed as the Node process exiting during the schema-migration step\n- Files appearing under unexpected paths on the database host that match content-type DEFAULT values from the application\n- Newly-created content-types named or shaped to extract specific data (attribute names like `passwd`, `etc`, `env`, `config`)",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@strapi/content-type-builder"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "5.33.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@strapi/plugin-content-type-builder"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.26.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/strapi/strapi/security/advisories/GHSA-3xcq-8mjw-h6mx"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-22599"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/strapi/strapi"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/strapi/strapi/releases/tag/v4.26.1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/strapi/strapi/releases/tag/v5.33.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-89" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-13T20:02:36Z",
    "nvd_published_at" : "2026-05-14T19:16:29Z"
  }
}