5.3
MEDIUM CVSS 4.0
CVE-2026-133765
Sandbox `__toString()` policy bypass via assignment and destructuring expressions
Description

The sandbox checks that a template may call toString() on an object before converting it to a string. Since Twig 3.23.0, assignments like x = obj, and the destructuring forms [a] = list and {a} = obj, evaluate to the value that they assign. The sandbox didn't check that value, so a sandboxed template could call a denied toString() method: {{ (x = obj) }} {{ ({secret: s} = obj)|join }} No tag needs to be allowed. The sandbox now checks the result of assignments like the result of filters and functions. {% do x = obj %} and {% if (x = obj) %} still work, since they don't convert the value to a string.

INFO

Published Date :

Nov. 24, 2026, 1:17 p.m.

Last Modified :

Dec. 1, 2026, 8:18 p.m.

Remotely Exploit :

No

Source :

b5aa5c7f-767d-4597-9c64-3ac08b8711c6
Affected Products

The following products are affected by CVE-2026-133765 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Symfony twig
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 134c704f-9b21-4f2e-91b3-4a467353bcc0
CVSS 4.0 MEDIUM b5aa5c7f-767d-4597-9c64-3ac08b8711c6
CVSS 4.0 MEDIUM b5aa5c7f-767d-4597-9c64-3ac08b8711c6
Solution
Update Twig to version 3.23.0 or later to address sandbox bypass.
  • Update Twig to version 3.23.0 or later.
  • Review sandbox configurations for proper enforcement.
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2026-133765.

URL Resource
https://github.com/twigphp/Twig/commit/6bcdbc3d4470dde23e3e2636e7053e0512387edd
https://github.com/twigphp/Twig/security/advisories/GHSA-ccrc-gqhf-3cxc
https://symfony.com/cve-2026-133765
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2026-133765 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2026-133765 weaknesses.

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2026-133765 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2026-133765 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0

    Dec. 01, 2026

    Action Type Old Value New Value
    Added SSVC {'id': 'CVE-2026-133765', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'none'}, {'automatable': 'no'}, {'technicalImpact': 'partial'}], 'version': '2.0.3', 'timestamp': '2026-11-30T17:56:22.128866Z'}
  • New CVE Received by b5aa5c7f-767d-4597-9c64-3ac08b8711c6

    Nov. 24, 2026

    Action Type Old Value New Value
    Added Description The sandbox checks that a template may call toString() on an object before converting it to a string. Since Twig 3.23.0, assignments like x = obj, and the destructuring forms [a] = list and {a} = obj, evaluate to the value that they assign. The sandbox didn't check that value, so a sandboxed template could call a denied toString() method: {{ (x = obj) }} {{ ({secret: s} = obj)|join }} No tag needs to be allowed. The sandbox now checks the result of assignments like the result of filters and functions. {% do x = obj %} and {% if (x = obj) %} still work, since they don't convert the value to a string.
    Added CVSS V4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
    Added CWE CWE-693
    Added CWE CWE-863
    Added Affected New affected value received. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/133xxx/CVE-2026-133765.json">CVE-2026-133765</a>
    Added Reference https://github.com/twigphp/Twig/commit/6bcdbc3d4470dde23e3e2636e7053e0512387edd
    Added Reference https://github.com/twigphp/Twig/security/advisories/GHSA-ccrc-gqhf-3cxc
    Added Reference https://symfony.com/cve-2026-133765
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.