Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthor template in sandboxed Twig
-
ExploitPass context object as html_cva variant value
-
Executionapply() casts object or reads ArrayAccess offset bypassing property check
-
ImpactDisclose private and protected properties
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Authorization logic validation
MITRE ATT&CK
1 technique across 1 tactic: Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires all of: the application renders attacker-controlled Twig templates in sandbox mode (SandboxExtension with a SecurityPolicy); that policy explicitly allows the html_cva function and the apply method of Twig\Extra\Html\Cva; and a sensitive object (one with private/protected properties, or an ArrayAccess object) is present in the template context. Limiting factors: impact is confined to disclosing properties of objects already supplied to the context - there is no code execution, write, or availability impact; the allow-listing of html_cva/apply is not a default sandbox configuration; and the attacker must be able to author the template source. Affected versions are twig/html-extra >=3.12.0 and <3.31.1; updating to 3.31.1 is the fix (non-array values are now treated as a single item and dropped, and variant maps are used only when they are arrays). |
| Impact | All signals point to genuinely low real-world risk. The vendor-supplied CVSS 4.0 base score is 2.3 (Low), with vector AV:N/AC:L/AT:P/PR:L/UI:N and only VC:L (low confidentiality impact), no integrity or availability impact, and no subsequent-system impact (SC:N/SI:N/SA:N). AT:P signals that a specific deployment condition must hold, and PR:L signals the attacker needs some privilege - here, the ability to author/inject templates inside a sandboxed Twig environment. There is no CISA KEV listing and no EPSS score was provided, so there is no evidence of active or probable widespread exploitation; the vuln.today Decision label is 'monitor', the lowest urgency tier, which is consistent with the low CVSS. The impact is limited to information disclosure - reading private/protected properties of objects that are already present in the template's context - rather than code execution or sandbox escape to the host. The one caveat is that the condition is narrow but real: it only bites applications that run untrusted templates in sandbox mode AND have explicitly allow-listed the html_cva function and Cva::apply AND place sensitive objects in the template context. Signals are consistent rather than conflicting; the main missing datum is EPSS (not provided) and there is no standalone weaponized exploit, only the advisory's demonstrative template and regression tests. |
| Exploit ScenarioDerived | In an application that renders untrusted, user-supplied Twig templates in sandbox mode and has allow-listed html_cva plus Cva::apply, an attacker authors a template that passes a context object (for example a user or service object) as a variant value, e.g. {{ html_cva('base', {c: {p: user}}).apply({c: 'p'}) }}. Because Cva::apply() cast values with (array) and read ArrayAccess maps by an attacker-chosen key, it bypasses the sandbox property allow-list and prints the object's private and protected properties. No standalone exploit tool is published, but the advisory and the patch's tests publish a working demonstrative template. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 24, 2026
Information disclosure in Twig's html-extra package (twig/html-extra) allows a sandboxed template to print the private and protected properties of objects already present in the template context, or to read template-chosen offsets from ArrayAccess objects, by passing those objects as variant values or variant maps to html_cva() and then calling Cva::apply(). Affected versions are 3.12.0 through 3.31.0; exploitation additionally requires a sandbox SecurityPolicy that explicitly allows the html_cva function and the apply method of Twig\Extra\Html\Cva, and an attacker able to author the template source - conditions that are not part of the default sandbox configuration. Severity is low (CVSS 2.3), impact is confined to disclosure of data already supplied to the template with no write, execution or availability effect, and no public exploit was identified at time of analysis; fixed in 3.31.1.
RemediationAI
Upgrade twig/html-extra to 3.31.1 or later, which is the vendor-released patch; the fix commit is https://github.com/twigphp/Twig/commit/ead08daef16e3a0b08d196717e929fc2ebd2fb11 and the advisory is https://github.com/twigphp/Twig/security/advisories/GHSA-gv3c-qhxr-hh56. If upgrading must be deferred, the exposure can be closed at the policy layer by removing the html_cva function and the apply method of Twig\Extra\Html\Cva from the SecurityPolicy allow-lists passed to SandboxExtension, so the affected callables cannot be reached from templates at all; the trade-off is that any legitimate sandboxed templates relying on html_cva or Cva::apply will fail with a security-policy error until the package is updated. Note that the upstream resolution treats non-array values as single items (objects are dropped and never match a variant) and only honours variant maps that are arrays, so behaviour for object-valued variants changes intentionally after patching.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Twig's sandbox mode (SandboxExtension plus a SecurityPolicy) restricts which functions, filters, tags, methods and properties a template may touch, and the property check is the core protection for objects exposed to templates. CWE-863 (Incorrect Authorization) applies here because Cva::apply() side-stepped that check: it converted the values of variants, default variants and compound variants - all supplied through the arguments of the html_cva() function - using a plain (array) cast. Casting an object to an array exposes its internal property table, so a template such as {{ html_cva('base', {c: {p: user}}).apply({c: 'p'}) }} could cause those property values to be emitted as CSS classes. A parallel path existed for variant maps that implement ArrayAccess: they were read with a key chosen by the template without the sandbox property check, and the returned offsets were printed. The upstream fix in commit ead08dae adds a toList() helper that treats any non-array value as a single item, so objects never match a variant and are dropped, and filters the variants map with array_filter($variants, 'is_array') so non-array variant maps are ignored; regression tests cover both the object-property and ArrayAccess-offset paths under a sandbox policy that allows html_cva and Cva::apply.
Know when Twig gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
Requires a non-default sandbox that allow-lists html_cva/apply plus sensitive context objects, so AC:H and PR:L; impact is read-only property disclosure, so C:L and I:N/A:N.
Primary rating from Vendor (Symfony).
CVSS VectorVendor: Symfony
DescriptionCVE.org
Cva::apply() converted the values of variants, default variants and compound variants with (array). These values come from the arguments of html_cva(). A sandboxed template could therefore pass any object of its context, and print the private and protected properties of that object:
{{ html_cva('base', {c: {p: user}}).apply({c: 'p'}) }}
Variant maps that are ArrayAccess objects were also read with a key that the template chooses, without the property check of the sandbox. The template then printed the offsets that the object returned.
Applications are affected when the sandbox allows the html_cva function and the apply method of Twig\Extra\Html\Cva.
A value that isn't an array is now treated as a single item, so objects are dropped and never match a variant. Variant maps are also only used when they're arrays.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
Twig before 2.4.4 allows Server-Side Template Injection (SSTI) via the search search_key parameter. Rated critical sever
Sandbox bypass in Twig template engine versions 2.16.x and 3.9.0 through 3.25.x allows attackers with template rendering
Twig is a template language for PHP. Rated high severity (CVSS 8.6), this vulnerability is remotely exploitable, no auth
Twig is a template language for PHP. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no auth
The displayBlock function Template.php in Sensio Labs Twig before 1.20.0, when Sandbox mode is enabled, allows remote at
Denial-of-service via resource exhaustion affects the Twig templating engine for PHP prior to 3.26.0, where the sandbox
Symfony is a PHP framework for web and console applications and a set of reusable PHP components. Rated medium severity
Sandboxed Twig templates that are permitted to use the `join` filter can disclose the private and protected properties o
Twig's security sandbox allow-list can be bypassed by a sandboxed template that uses the `embed` tag with a parent expre
Sandbox policy bypass in Twig 3.23.0 through 3.31.0 lets whoever supplies the template source force the engine to invoke
A sandbox policy bypass in the Twig template engine (versions 3.21.0 through 3.30.x, fixed in 3.31.1) lets a template au
A sandbox information disclosure exists in Twig before 1.38.0 and 2.x before 2.7.0 because, under some circumstances, it
EUVD-2026-133918
NVD
CVE.org
EPSS
GitHub
VulDB
Exploit-DB