Skip to main content

Twig CVE-2026-46635

LOW
Incorrect Authorization (CWE-863)
2026-05-21 https://github.com/twigphp/Twig GHSA-vcc8-phrv-43wj

Lifecycle Timeline

2
Source Code Evidence Fetched
May 21, 2026 - 22:02 vuln.today
Analysis Generated
May 21, 2026 - 22:02 vuln.today

DescriptionNVD

Description

The 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.

An 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.

Resolution

The column filter now routes object property reads through the sandbox-aware attribute accessor so the property allowlist is enforced.

Credits

Twig: would like to thank Claude Mythos Preview (via Project Glasswing) for reporting the issue and providing the fix.

AnalysisAI

Twig's sandbox security policy is bypassed via the column filter when processing arrays of PHP objects, allowing an untrusted template author to read any public or magic property of any object reachable in the render context - completely circumventing the SecurityPolicy's allowedProperties restrictions. All twig/twig versions prior to 3.26.0 are affected when sandbox mode is active and untrusted authors have column in their allowedFilters. …

Sign in for full analysis, threat intelligence, and remediation guidance.

Share

CVE-2026-46635 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy