- Accueil
- Vulnérabilités
- CVE-2026-133765
CVE-2026-133765
Sandbox `__toString()` policy bypass via assignment and destructuring expressions
Résumé
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.
Aucune traduction française : description d’origine affichée.
Produits et versions affectés
Twig (1 ligne(s))
| Produit | Versions | Corrigé dans | Source |
|---|---|---|---|
| twig/twig | de 3.23.0 (inclus) à 3.31.1 (exclu) |
— | CNA (éditeur ou attributeur) |
Correctif
Non renseigné par l’éditeur.
Contournement
Aucun contournement renseigné.
Savoir si vous êtes touché
Aucune méthode de vérification renseignée.
Chronologie
- — Publication de la CVE (cve)
Références
Provenance des données
- Statut
- NVD
- Date de publication
- NVD
- Description
- CNA (éditeur ou attributeur)
- Score CVSS
- CNA (éditeur ou attributeur)
- Faiblesse (CWE)
- CNA (éditeur ou attributeur)
- Vecteur CVSS
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(CVSS 4.0, CNA:Symfony)- Faiblesse
- CWE-693 · Autre (CWE-693)