CVE-2026-48808
highpriority · track · 30OT risk · elevatedEPSS 0.004 · 35 %ileEUUSEPSS · scored 2026-10-28
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.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · low–high · 2.3–7.5
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (3)
Products and version ranges known to be affected.
advisories (1)
Vendor and ecosystem advisories describing this.
- GHSA-h8vq-8gpg-mhcgTwig: Sandbox property allowlist bypass via the `column` filter under `SourcePolicyInterface`2026-06-30ghsa · osvUS
### Description This 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). `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. A 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. ### Resolution `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. ### Credits Twig would like to thank Vincent55 Yang for reporting the issue and Fabien Potencier for providing the fix.
also known as (3)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (10)
External citations — patches, advisories, analysis.
- https://github.com/twigphp/Twig/commit/09c6706407ed7b1cb2d7d1408004f811e47e0424cnnvd
- https://github.com/twigphp/Twig/releasesPatchcnnvd
- https://github.com/twigphp/Twig/releases/tag/v3.27.0cnnvd
- https://github.com/twigphp/Twig/security/advisories/GHSA-h8vq-8gpg-mhcgcnnvd
- https://github.com/twigphp/Twig/commit/09c6706407ed7b1cb2d7d1408004f811e47e0424enisa_euvd
- https://github.com/twigphp/Twig/releases/tag/v3.27.0enisa_euvd
- https://github.com/twigphp/Twig/security/advisories/GHSA-h8vq-8gpg-mhcgenisa_euvd
- https://github.com/twigphp/Twig/commit/09c6706407ed7b1cb2d7d1408004f811e47e0424Patchnvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan