CVE-2026-46635: Twig: Sandbox property allowlist bypass via the `column` filter (array_column on objects)

Published May 21, 2026
·
Updated

Description

The column filter passes its input straight to PHP's native arraycolumn(). When the array elements are objects, arraycolumn() 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.

Other sources

Twig is a template language for PHP. Prior to 3.26.0, the column filter passes object arrays to PHP arraycolumn(), 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.

MITRE

Affected Software

2 affected componentsFixes available
composer/twig/twig<3.26.0
3.26.0
Symfony Twig<3.26.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/twig/twig to a version that resolves this vulnerability.

    Fixed in 3.26.0
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 3.26.0

Event History

May 21, 2026
Advisory Published
via GitHub·09:25 PM
Data Sourced
via GitHub·09:25 PM
DescriptionWeaknessAffected Software
Jul 14, 2026
CVE Published
via MITRE·09:12 PM
Data Sourced
via MITRE·09:12 PM
DescriptionWeakness
Data Sourced
via NVD·10:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-46635?

The severity of CVE-2026-46635 is rated at 47.

2

What software is affected by CVE-2026-46635?

CVE-2026-46635 affects the composer/twig/twig software.

3

How does CVE-2026-46635 impact PHP object properties?

CVE-2026-46635 allows access to PHP object properties directly, including invoking __get/__isset methods.

4

How do I fix CVE-2026-46635?

To fix CVE-2026-46635, update to the latest version of composer/twig/twig that addresses this vulnerability.

5

When was CVE-2026-46635 published?

CVE-2026-46635 was published on May 21, 2026.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203