Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. twig/twig
  4. ›
  5. CVE-2026-46635

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

May 21, 2026

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.

References

  • github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2026-46635.yaml
  • github.com/advisories/GHSA-vcc8-phrv-43wj
  • github.com/twigphp/Twig/security/advisories/GHSA-vcc8-phrv-43wj
  • nvd.nist.gov/vuln/detail/CVE-2026-46635
  • symfony.com/cve-2026-46635

Code Behaviors & Features

Detect and mitigate CVE-2026-46635 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 3.26.0

Fixed versions

  • 3.26.0

Solution

Upgrade to version 3.26.0 or above.

Impact 2.7 LOW

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-863: Incorrect Authorization

Source file

packagist/twig/twig/CVE-2026-46635.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 10 Jun 2026 12:17:58 +0000.