CVE-2026-133765
Last modified
CVE-2026-133765 is a medium-severity vulnerability rated 5.3/10 on the CVSS scale. 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. EPSS estimates a 0.53% chance of exploitation in the next 30 days.
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.
Metrics
Weakness Enumeration
Affected Software
Source: CNA advisory (CVE.org). NVD analysis pending.
| Vendor | Product | Versions |
|---|---|---|
| Twig | twig/twig | >= 3.23.0, < 3.31.1 |
References
Timeline
- Published
- Last Modified
- Status
- Awaiting Analysis
Frequently Asked Questions
What is CVE-2026-133765?
How severe is CVE-2026-133765?
How do I fix CVE-2026-133765?
How Strix Helps
- Uncovering a hidden BOLA in Appsmith's snapshot logicStrix autonomously discovered a BOLA/IDOR vulnerability in Appsmith's snapshot deletion path.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-13376Improper Neutralization of Input During Web Page Generation …4.8
- CVE-2026-133760The fix for CVE-2026-109449 made the expression parser check…8.7
- CVE-2026-133761CsvEncoder::decode() splits each header cell on the key sepa…8.7
- CVE-2026-133762Since Symfony 7.4.0, FrameworkBundle chooses the error rende…6
- CVE-2026-133763The sandbox checks that a template may call toString() on an…5.3
- CVE-2026-133764The sandbox checks that a template may call toString() on an…2.3
- CVE-2026-133766Since Twig 3.28.0, the sandbox skips the toString() check of…2.3
- CVE-2026-133767When the parent of an embed tag was an expression other than…5.3
- CVE-2026-133768The join filter converted a value that isn't iterable with (…5.3
- CVE-2026-133769Cva::apply() converted the values of variants, default varia…2.3
- CVE-2026-13377Improper Neutralization of Input During Web Page Generation …4.8
- CVE-2026-133770The sandbox allows every method of Twig\Markup objects, incl…2.1
Are you affected by CVE-2026-133765?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
