CWE-693: Protection Mechanism Failure in twigphp Twig (CVE-2026-48808)
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.
AI Analysis
Technical Summary
The vulnerability in twig/twig before version 3.27.0 is a sandbox property allowlist bypass caused by improper handling of the `column` filter under the `SourcePolicyInterface` sandbox mode. The `column` filter incorrectly routes property checks, losing the sandbox source context and skipping allowlist enforcement. This allows a template author to read any public or magic property of objects in the render context, violating sandbox restrictions. This is a policy enforcement gap limited to the `SourcePolicyInterface` sandbox mode and does not impact the global sandbox mode.
Potential Impact
An attacker with the ability to author templates in a twig/twig environment using the `SourcePolicyInterface` sandbox mode can bypass property allowlist restrictions and read any public or magic property of objects in the render context. This could lead to unauthorized information disclosure within the application context. The vulnerability does not affect other sandbox modes and requires sandboxing to be enabled via `SourcePolicyInterface`.
Mitigation Recommendations
A fix is available in twig/twig version 3.27.0 and later. Users should upgrade to version 3.27.0 or newer to remediate this vulnerability. Patch status is confirmed by the versioning information indicating versions prior to 3.27.0 are affected. No vendor advisory content was provided, so check the official twig/twig release notes or security advisories for confirmation and additional guidance.
CWE-693: Protection Mechanism Failure in twigphp Twig (CVE-2026-48808)
Description
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 v4.0
Score 6.0medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in twig/twig before version 3.27.0 is a sandbox property allowlist bypass caused by improper handling of the `column` filter under the `SourcePolicyInterface` sandbox mode. The `column` filter incorrectly routes property checks, losing the sandbox source context and skipping allowlist enforcement. This allows a template author to read any public or magic property of objects in the render context, violating sandbox restrictions. This is a policy enforcement gap limited to the `SourcePolicyInterface` sandbox mode and does not impact the global sandbox mode.
Potential Impact
An attacker with the ability to author templates in a twig/twig environment using the `SourcePolicyInterface` sandbox mode can bypass property allowlist restrictions and read any public or magic property of objects in the render context. This could lead to unauthorized information disclosure within the application context. The vulnerability does not affect other sandbox modes and requires sandboxing to be enabled via `SourcePolicyInterface`.
Mitigation Recommendations
A fix is available in twig/twig version 3.27.0 and later. Users should upgrade to version 3.27.0 or newer to remediate this vulnerability. Patch status is confirmed by the versioning information indicating versions prior to 3.27.0 are affected. No vendor advisory content was provided, so check the official twig/twig release notes or security advisories for confirmation and additional guidance.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-h8vq-8gpg-mhcg
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-48808"]
- Ecosystems
- ["Packagist"]
- Database Specific Severity
- MODERATE
- Cvss Version
- null
Threat ID: 6a4452e027e9c797198e107f
Added to database: 06/30/2026, 23:36:00 UTC
Last enriched: 07/15/2026, 07:56:09 UTC
Last updated: 07/31/2026, 19:24:46 UTC
Views: 62
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.