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

CVE-2026-48808: Twig: Sandbox property allowlist bypass via the `column` filter under `SourcePolicyInterface`

June 30, 2026

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.

References

  • github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2026-48808.yaml
  • github.com/advisories/GHSA-h8vq-8gpg-mhcg
  • github.com/twigphp/Twig/releases/tag/v3.27.0
  • github.com/twigphp/Twig/security/advisories/GHSA-h8vq-8gpg-mhcg
  • nvd.nist.gov/vuln/detail/CVE-2026-48808
  • symfony.com/blog/cve-2026-48808-sandbox-property-allowlist-bypass-via-the-column-filter-under-sourcepolicyinterface

Code Behaviors & Features

Detect and mitigate CVE-2026-48808 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.27.0

Fixed versions

  • 3.27.0

Solution

Upgrade to version 3.27.0 or above.

Weakness

  • CWE-693: Protection Mechanism Failure
  • CWE-863: Incorrect Authorization

Source file

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

Spotted a mistake? Edit the file on GitLab.

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

Page generated Sat, 18 Jul 2026 00:22:19 +0000.