{"id":"CVE-2026-48808","aliases":["CVE-2026-48808","GHSA-h8vq-8gpg-mhcg"],"related":[],"kind":"vulnerability","state":"published","title":"Twig: Sandbox property allowlist bypass via the `column` filter under `SourcePolicyInterface`","summary":"Twig is a template language for PHP. Prior to 3.27.0, the column filter passes the active sandbox state as a boolean but does not forward the current Source to SandboxExtension::checkPropertyAllowed(), so SourcePolicyInterface decisions are lost and a template author can read public or magic properties not allowed by the sandbox policy. This issue is fixed in version 3.27.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Twig is a template language for PHP. Prior to 3.27.0, the column filter passes the active sandbox state as a boolean but does not forward the current Source to SandboxExtension::checkPropertyAllowed(), so SourcePolicyInterface decisions are lost and a template author can read public or magic properties not allowed by the sandbox policy. This issue is fixed in version 3.27.0.","source":"cvelist"},{"lang":"en","text":"### Description\n\nThis is a residual bypass of CVE-2026-46635 / GHSA-vcc8-phrv-43wj that only affects sandboxing enabled through `SourcePolicyInterface` (and not the regular global sandbox mode).\n\n`CoreExtension::column()` receives the active sandbox state via the `needs_is_sandboxed` channel as a boolean `$isSandboxed`, but then routes the per-element property reads through `SandboxExtension::checkPropertyAllowed()` without forwarding the current `Source`. `SandboxExtension::checkPropertyAllowed()` re-evaluates `isSandboxed($source)` internally; with `$source = null` the `SourcePolicyInterface`-driven decision is lost, the method short-circuits to \"not sandboxed\", and the property allowlist is never consulted.\n\nA template author whose sandbox is gated by a `SourcePolicyInterface` and who has `column` on their `allowedFilters` list can therefore read any public or magic property of any object reachable in the render context, regardless of `SecurityPolicy::$allowedProperties`. Direct attribute access to the same property is blocked, and the same payload is also blocked under global sandbox mode, which makes this a clear policy enforcement gap rather than a configuration issue.\n\n### Resolution\n\n`CoreExtension::column()` no longer goes through the `SandboxExtension` wrapper for the property check. It calls the security policy directly: the per-source decision is already captured by the `$isSandboxed` boolean computed at the call site, so the property allowlist is enforced consistently for both global and source-policy sandboxing.\n\n### Credits\n\nTwig would like to thank Vincent55 Yang for reporting the issue and Fabien Potencier for providing the fix.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Twig es un lenguaje de plantillas para PHP. Antes de la versión 3.27.0, el filtro column pasa el estado activo de la sandbox como un booleano pero no reenvía el Source actual a SandboxExtension::checkPropertyAllowed(), por lo que las decisiones de SourcePolicyInterface se pierden y un autor de plantillas puede leer propiedades públicas o mágicas no permitidas por la política de la sandbox. Este problema está solucionado en la versión 3.27.0.","source":"nvd"}],"published":"2026-06-30T18:43:45.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:P/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","score":6,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","score":6,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"rating","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-693","CWE-863"],"affected":[{"ranges":[{"version":"< 3.27.0","status":"affected"}],"vendor":"twigphp","product":"Twig","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.27.0"}],"ecosystem":"Packagist","package":"twig/twig","purl":"pkg:composer/twig/twig","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.27.0"}],"vendor":"symfony","product":"twig","cpe":"cpe:2.3:a:symfony:twig:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/twigphp/Twig/security/advisories/GHSA-h8vq-8gpg-mhcg","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/twigphp/Twig/commit/09c6706407ed7b1cb2d7d1408004f811e47e0424","tags":["patch","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/twigphp/Twig/releases/tag/v3.27.0","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2026-48808.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/twigphp/Twig","tags":["package"],"sources":["ghsa"]},{"url":"https://symfony.com/blog/cve-2026-48808-sandbox-property-allowlist-bypass-via-the-column-filter-under-sourcepolicyinterface","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-07-15T14:31:48.326Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-48808","url":"https://www.cve.org/CVERecord?id=CVE-2026-48808","licence":"CVE Terms of Use","modified":"2026-07-15T14:31:58.897Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-h8vq-8gpg-mhcg","url":"https://github.com/advisories/GHSA-h8vq-8gpg-mhcg","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:49.791Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-48808","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-48808","licence":"Public domain","modified":"2026-10-24T22:10:00.210Z"}],"updatedAt":"2026-11-25T22:59:28.248Z","epss":{"score":0.00407,"percentile":0.26615,"date":"2026-11-30T12:00:22.000Z"}}