CWE-693: Protection Mechanism Failure in twigphp Twig (CVE-2026-48805)
Twig, a PHP template language, has a protection mechanism failure vulnerability in versions prior to 3.27.0. Deprecated internal wrappers in src/Resources/core.php do not correctly forward the current sandbox state to certain functions, allowing legacy calls to bypass sandbox callable restrictions. This issue is addressed in version 3.27.0.
AI Analysis
Technical Summary
The vulnerability in twigphp Twig (CVE-2026-48805) involves deprecated internal wrappers in src/Resources/core.php that fail to forward the current sandbox state to CoreExtension::checkArrow(), arraySome(), and arrayEvery(). This flaw permits legacy calls such as twig_array_some(), twig_array_every(), and twig_check_arrow_in_sandbox() to bypass sandbox callable restrictions, potentially weakening the sandbox protection mechanism. The issue is fixed in Twig version 3.27.0.
Potential Impact
Bypassing sandbox callable restrictions can allow unintended code execution paths within the Twig template sandbox, potentially leading to execution of unauthorized code or logic. The CVSS score is 5.3 (medium severity), indicating a moderate impact with network attack vector, low attack complexity, and limited privileges required. There are no known exploits in the wild.
Mitigation Recommendations
Upgrade Twig to version 3.27.0 or later, where this vulnerability is fixed. No other mitigations are indicated or necessary once the update is applied.
CWE-693: Protection Mechanism Failure in twigphp Twig (CVE-2026-48805)
Description
Twig, a PHP template language, has a protection mechanism failure vulnerability in versions prior to 3.27.0. Deprecated internal wrappers in src/Resources/core.php do not correctly forward the current sandbox state to certain functions, allowing legacy calls to bypass sandbox callable restrictions. This issue is addressed in version 3.27.0.
CVSS v4.0
Score 5.3medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in twigphp Twig (CVE-2026-48805) involves deprecated internal wrappers in src/Resources/core.php that fail to forward the current sandbox state to CoreExtension::checkArrow(), arraySome(), and arrayEvery(). This flaw permits legacy calls such as twig_array_some(), twig_array_every(), and twig_check_arrow_in_sandbox() to bypass sandbox callable restrictions, potentially weakening the sandbox protection mechanism. The issue is fixed in Twig version 3.27.0.
Potential Impact
Bypassing sandbox callable restrictions can allow unintended code execution paths within the Twig template sandbox, potentially leading to execution of unauthorized code or logic. The CVSS score is 5.3 (medium severity), indicating a moderate impact with network attack vector, low attack complexity, and limited privileges required. There are no known exploits in the wild.
Mitigation Recommendations
Upgrade Twig to version 3.27.0 or later, where this vulnerability is fixed. No other mitigations are indicated or necessary once the update is applied.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-p42q-9prx-q5wq
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-48805"]
- Ecosystems
- ["Packagist"]
- Database Specific Severity
- LOW
- Cvss Version
- null
Threat ID: 6a4452e027e9c797198e1094
Added to database: 06/30/2026, 23:36:00 UTC
Last enriched: 07/22/2026, 21:00:00 UTC
Last updated: 07/31/2026, 19:24:50 UTC
Views: 75
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.