Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as sandbox template author
-
ExploitSubmit template with {{ obj|join(',') }}
-
ExecutionFilter casts object via (array) exposing all properties
-
ImpactRender leaks private/protected property values
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: (1) the application runs Twig in sandbox mode with a security policy; (2) that policy allows the |
| Impact | This is a genuine but bounded sandbox-escape information-disclosure flaw, not a high-urgency emergency. The supplied CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N, score 5.3) and CWE-863 (Incorrect Authorization) align well with the mechanism: a low-privileged actor who is permitted to author or submit templates in Twig's sandbox mode can read object properties the sandbox policy is supposed to withhold. Impact is confidentiality-only and rated Low - no integrity or availability effect, no code execution, no scope change asserted by the vendor. The vuln.today decision label is 'this_month' (routine patch cadence), which is consistent with the absence of exploitation signals: there is no CISA KEV listing and no EPSS probability supplied, so there is no evidence of active or automatable exploitation. No working exploit code is referenced - only a vendor advisory, GHSA advisory, and the fix commit are provided; note the public patch commit itself reveals the one-line root cause and could ease exploit development. Real-world risk is confined to applications that actually run Twig in sandbox mode AND allow the |
| Exploit ScenarioDerived | An application that lets semi-trusted users author Twig templates in sandbox mode (e.g. a CMS, email/notification template builder, or reporting tool) exposes an object such as the current user. An attacker who is an allowed template author writes {{ user|join(',') }}, which casts the non-iterable object to an array and concatenates all properties - including private and protected ones the sandbox policy denies - leaking data they could not otherwise read. No working public exploit is referenced, but the payload is trivial and the fix commit is public. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 24, 2026
Sandboxed Twig templates that are permitted to use the join filter can disclose the private and protected properties of non-iterable objects, bypassing the sandbox security policy's property allow-list. The filter cast non-iterable values with (array) $value, which expands any object into all of its properties - including ones the policy denies and that templates cannot read through any other construct - so a construct such as {{ user|join(',') }} printed them. Only applications that run Twig in sandbox mode with a policy that allows join, and where a non-iterable domain object is reachable in the template context, are affected; an attacker must be able to author or submit template source in that sandbox (authenticated per the CVSS vector, PR:L), impact is confined to property-value disclosure with no write or code-execution path, and no public exploit was identified at time of analysis.
RemediationAI
Upgrade twig/twig to 3.31.1 or later - the vendor-released patch, available as commit 6bcede134671133a4a056199af5cf4749d189d72 on the 3.x branch and detailed in GHSA-p2x6-ppf3-32r3 and https://symfony.com/cve-2026-133768 - after which non-iterable values are joined as a single item, Stringable output remains governed by the security policy, and other objects raise an error instead of leaking properties. If upgrading cannot be done immediately, remove join from the allowed-filters list of the sandbox SecurityPolicy for any template that renders untrusted source; the trade-off is that legitimate templates relying on join for sequences will fail until the upgrade lands. As a complementary control, restrict who may author or submit template source into sandboxed environments, since the bypass requires that capability, and audit sandbox policies that both allow join and expose rich domain objects to template context. Given the vendor-rated decision priority of this_month, schedule the upgrade within the normal monthly patch cycle rather than as an emergency change.
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 is a PHP templating engine whose sandbox extension (Twig\Extension\SandboxExtension plus a SecurityPolicyInterface) lets an application render untrusted template source while restricting which tags, filters, functions, methods and properties templates may use. The sandbox's property allow-list is the control that prevents templates from reading arbitrary object internals. The join filter in src/Extension/CoreExtension.php handled values that are not sequences by casting them with (array) $value; in PHP that cast on an object yields an associative array of every declared property, including private and protected ones. The result was an incorrect-authorization condition (CWE-863): a template confined by policy could reach data the policy explicitly denies. The upstream fix replaces the cast with null === $value ? [] : [$value], so a non-iterable value is joined as a single item - null yields an empty string, a Stringable object is rendered through its __toString() with that method still subject to policy checking (a denied __toString raises SecurityNotAllowedMethodError), and other objects throw a RuntimeError about conversion to string, matching the behaviour of the first and last filters. The commit also documents the new semantics in doc/filters/join.rst, adds fixtures to tests/Fixtures/filters/join.test, and adds sandbox regression tests covering both the non-iterable-object and Stringable cases. Default, non-sandboxed Twig usage is unaffected, and no trigger beyond the filter/policy interaction is described in the available sources.
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:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
Template author is a low privilege so PR:L; server-side rendering over the app makes AV:N/AC:L; confidentiality-only disclosure of some properties gives C:L, I/A:N.
Primary rating from Vendor (Symfony).
CVSS VectorVendor: Symfony
DescriptionCVE.org
The join filter converted a value that isn't iterable with (array) $value. For an object, that gives every property, including the private and protected ones. A sandboxed template allowed to use join could therefore print properties that the policy denies, and that templates can't read otherwise:
{{ user|join(',') }}
A value that isn't iterable is now joined as a single item. A Stringable object prints its checked string, and other objects throw, as with the first and last filters.
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
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
Twig's autoescaping logic can print attacker-controlled values without HTML escaping when a template contains a macro im
EUVD-2026-133917
NVD
CVE.org
EPSS
GitHub
VulDB
Exploit-DB