{"id":"CVE-2026-22599","aliases":["CVE-2026-22599","GHSA-3xcq-8mjw-h6mx"],"related":[],"kind":"vulnerability","state":"published","title":"Strapi Vulnerable to SQL Injection in Content Type Builder","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### 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`)","format":"markdown","source":"ghsa"},{"lang":"es","text":"Strapi es un sistema de gestión de contenido headless de código abierto. En versiones de la rama 4.x anteriores a la 4.26.1 y de la rama 5.x anteriores a la 5.33.2, existía una vulnerabilidad de inyección de consultas de base de datos en la API de escritura del Content-Type Builder de Strapi. Un administrador autenticado podía inyectar sentencias de base de datos arbitrarias a través del atributo ’column.defaultTo’ al crear o modificar un tipo de contenido. Establecer ’defaultTo’ como una tupla ’[value, { isRaw: true }]’ hacía que el valor se pasara directamente a ’db.connection.raw()’ de Knex durante la migración del esquema sin sanitización, permitiendo la ejecución de sentencias arbitrarias en la capa de base de datos. Dependiendo del motor de base de datos, esto permitía la lectura arbitraria de archivos a través de funciones de utilidad de base de datos, la denegación de servicio a través de un fallo forzado del servidor por error de migración de esquema, y en motores que permiten la ejecución de programas externos, la ejecución remota de código contra el servidor de base de datos. El parche en las versiones 4.26.1 y 5.33.2 aborda esto restringiendo todas las APIs de escritura del Content-Type Builder solo al modo de desarrollo. Las implementaciones de producción que ejecutan la v5.33.2 o posterior devuelven 404 para las solicitudes contra ’/content-type-builder/content-types’ y los puntos finales relacionados, eliminando por completo la superficie de ataque alcanzable por red.","source":"nvd"}],"published":"2026-05-13T20:02:36.000Z","modified":"2026-10-26T14:10:00.130Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":9.3,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":9.3,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","score":7.2,"rating":"HIGH"}],"cwes":["CWE-89"],"affected":[{"ranges":[{"version":">= 5.0.0, < 5.33.2","status":"affected"},{"version":">= 4.0.0, < 4.26.1","status":"affected"}],"vendor":"strapi","product":"strapi","source":"cvelist"},{"ranges":[{"version":">= 5.0.0, < 5.33.2","status":"affected"},{"version":">= 4.0.0, < 4.26.1","status":"affected"}],"vendor":"strapi","product":"@strapi/content-type-builder","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"5.0.0","status":"affected","fixed":"5.33.2"}],"ecosystem":"npm","package":"@strapi/content-type-builder","purl":"pkg:npm/%40strapi/content-type-builder","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"4.0.0","status":"affected","fixed":"4.26.1"}],"ecosystem":"npm","package":"@strapi/plugin-content-type-builder","purl":"pkg:npm/%40strapi/plugin-content-type-builder","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"4.0.0","fixed":"4.26.1"},{"status":"affected","introduced":"5.0.0","fixed":"5.33.2"}],"vendor":"strapi","product":"strapi","cpe":"cpe:2.3:a:strapi:strapi:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/strapi/strapi/security/advisories/GHSA-3xcq-8mjw-h6mx","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/strapi/strapi/releases/tag/v4.26.1","tags":["patch","product","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/strapi/strapi/releases/tag/v5.33.2","tags":["patch","product","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-22599","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/strapi/strapi","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-05-14T19:45:08.219Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-22599","url":"https://www.cve.org/CVERecord?id=CVE-2026-22599","licence":"CVE Terms of Use","modified":"2026-05-14T19:45:29.894Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-3xcq-8mjw-h6mx","url":"https://github.com/advisories/GHSA-3xcq-8mjw-h6mx","licence":"CC-BY-4.0","modified":"2026-05-16T00:09:03.616Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-22599","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-22599","licence":"Public domain","modified":"2026-10-26T14:10:00.130Z"}],"updatedAt":"2026-11-25T22:59:21.742Z","epss":{"score":0.01178,"percentile":0.68515,"date":"2026-12-01T12:00:22.000Z"}}