Skip to main content

Twig html-extra EUVDEUVD-2026-133918

| CVE-2026-133769 LOW
Incorrect Authorization (CWE-863)
2026-11-24 Symfony
2.3
CVSS 4.0 · Vendor: Symfony
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Author template in sandboxed Twig
  2. Exploit
    Pass context object as html_cva variant value
  3. Execution
    apply() casts object or reads ArrayAccess offset bypassing property check
  4. Impact
    Disclose 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.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

twig/html-extra 3.12.0 <3.31.1

Affected Packages

euvd twig_html_extra fix: 3.31.1

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

Vendor (Symfony) PRIMARY 2.3 LOW
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
vuln.today AI 3.1 LOW

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.

3.1 AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N
4.0 AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (Symfony).

CVSS VectorVendor: Symfony

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

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

EPSS Score
0.5%
Top 62% exploitable
Prevalence
Medium
optional Twig add-on package, common in PHP apps but not universally installed
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Low

Priority Score

13
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +12
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

More in Twig

View all
CVE-2018-13818 CRITICAL POC
9.8 Jul 10

Twig before 2.4.4 allows Server-Side Template Injection (SSTI) via the search search_key parameter. Rated critical sever

CVE-2026-24425 HIGH
8.7 May 20

Sandbox bypass in Twig template engine versions 2.16.x and 3.9.0 through 3.25.x allows attackers with template rendering

CVE-2024-45411 HIGH
8.6 Sep 09

Twig is a template language for PHP. Rated high severity (CVSS 8.6), this vulnerability is remotely exploitable, no auth

CVE-2022-39261 HIGH
7.5 Sep 28

Twig is a template language for PHP. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no auth

CVE-2015-7809 MEDIUM
6.8 Nov 06

The displayBlock function Template.php in Sensio Labs Twig before 1.20.0, when Sandbox mode is enabled, allows remote at

CVE-2026-46627 HIGH
7.1 Jul 14

Denial-of-service via resource exhaustion affects the Twig templating engine for PHP prior to 3.26.0, where the sandbox

CVE-2023-46734 MEDIUM
6.1 Nov 10

Symfony is a PHP framework for web and console applications and a set of reusable PHP components. Rated medium severity

CVE-2026-133768 MEDIUM
5.3 Nov 24

Sandboxed Twig templates that are permitted to use the `join` filter can disclose the private and protected properties o

CVE-2026-133767 MEDIUM
5.3 Nov 24

Twig's security sandbox allow-list can be bypassed by a sandboxed template that uses the `embed` tag with a parent expre

CVE-2026-133765 MEDIUM
5.3 Nov 24

Sandbox policy bypass in Twig 3.23.0 through 3.31.0 lets whoever supplies the template source force the engine to invoke

CVE-2026-133763 MEDIUM
5.3 Nov 24

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

CVE-2019-9942 LOW
3.7 Mar 23

A sandbox information disclosure exists in Twig before 1.38.0 and 2.x before 2.7.0 because, under some circumstances, it

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy