{"id":"CVE-2026-46635","aliases":["CVE-2026-46635","GHSA-vcc8-phrv-43wj"],"related":[],"kind":"vulnerability","state":"published","title":"Twig: Sandbox property allowlist bypass via the `column` filter (array_column on objects)","summary":"Twig is a template language for PHP. Prior to 3.26.0, the column filter passes object arrays to PHP array_column(), which reads public and magic properties without reaching CoreExtension::getAttribute() or SandboxExtension::checkPropertyAllowed(), allowing an untrusted template author with column in allowedFilters to read properties that are not in the sandbox allowlist. This issue is fixed in version 3.26.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Twig is a template language for PHP. Prior to 3.26.0, the column filter passes object arrays to PHP array_column(), which reads public and magic properties without reaching CoreExtension::getAttribute() or SandboxExtension::checkPropertyAllowed(), allowing an untrusted template author with column in allowedFilters to read properties that are not in the sandbox allowlist. This issue is fixed in version 3.26.0.","source":"cvelist"},{"lang":"en","text":"### Description\n\nThe `column` filter passes its input straight to PHP's native `array_column()`. When the array elements are objects, `array_column()` reads `$obj->$name` (and `$obj->$index`) directly, including invoking `__get`/`__isset`. Because this property read happens entirely in PHP native code and never reaches `CoreExtension::getAttribute()`, `SandboxExtension::checkPropertyAllowed()` is never consulted.\n\nAn untrusted template author with `column` in their `allowedFilters` list can therefore read any public or magic property of any object reachable in the render context, regardless of the `SecurityPolicy` `allowedProperties` list. This is a variant of CVE-2024-51755 / GHSA-jjxq-ff2g-95vh that the `ArrayAccess`-focused fix did not cover.\n\n### Resolution\n\nThe `column` filter now routes object property reads through the sandbox-aware attribute accessor so the property allowlist is enforced.\n\n### Credits\n\nTwig: would like to thank Claude Mythos Preview (via Project Glasswing) for reporting the issue and providing the fix.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Twig es un lenguaje de plantillas para PHP. Antes de la versión 3.26.0, el filtro column pasa arrays de objetos a la función PHP array_column(), la cual lee propiedades públicas y mágicas sin pasar por CoreExtension::getAttribute() o SandboxExtension::checkPropertyAllowed(), permitiendo a un autor de plantillas no confiable con column en allowedFilters leer propiedades que no están en la lista de permitidos de la sandbox. Este problema está solucionado en la versión 3.26.0.","source":"nvd"}],"published":"2026-05-21T21:25:55.000Z","modified":"2026-10-24T22:10:00.210Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","rating":"LOW"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-863"],"affected":[{"ranges":[{"version":"< 3.26.0","status":"affected"}],"vendor":"twigphp","product":"Twig","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.26.0"}],"ecosystem":"Packagist","package":"twig/twig","purl":"pkg:composer/twig/twig","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.26.0"}],"vendor":"symfony","product":"twig","cpe":"cpe:2.3:a:symfony:twig:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/twigphp/Twig/security/advisories/GHSA-vcc8-phrv-43wj","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/twigphp/Twig/commit/f05c5011c25caf17de37614b7e04662022532ac4","tags":["patch","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/twigphp/Twig/releases/tag/v3.26.0","tags":["release-notes","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2026-46635.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/twigphp/Twig","tags":["package"],"sources":["ghsa"]},{"url":"https://symfony.com/cve-2026-46635","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-07-15T13:20:10.732Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-46635","url":"https://www.cve.org/CVERecord?id=CVE-2026-46635","licence":"CVE Terms of Use","modified":"2026-07-15T13:26:27.106Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-vcc8-phrv-43wj","url":"https://github.com/advisories/GHSA-vcc8-phrv-43wj","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:47.571Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-46635","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-46635","licence":"Public domain","modified":"2026-10-24T22:10:00.210Z"}],"updatedAt":"2026-11-25T22:59:28.238Z","epss":{"score":0.00297,"percentile":0.24019,"date":"2026-12-01T12:00:22.000Z"}}