{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-133765",
        "assignerOrgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
        "state": "PUBLISHED",
        "assignerShortName": "Symfony",
        "dateReserved": "2026-11-20T14:01:43.158Z",
        "datePublished": "2026-11-24T13:07:48.546Z",
        "dateUpdated": "2026-12-01T19:38:31.538Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
                "shortName": "Symfony",
                "dateUpdated": "2026-11-24T13:07:48.546Z"
            },
            "title": "Sandbox `__toString()` policy bypass via assignment and destructuring expressions",
            "datePublic": "2026-11-24T12:58:32.000Z",
            "descriptions": [
                {
                    "lang": "en",
                    "value": "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:\n\n{{ (x = obj) }}\n{{ ({secret: s} = obj)|join }}\n\nNo tag needs to be allowed.\n\nThe 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.",
                    "supportingMedia": [
                        {
                            "type": "text/markdown",
                            "base64": false,
                            "value": "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:\n\n```twig\n{{ (x = obj) }}\n{{ ({secret: s} = obj)|join }}\n```\n\nNo tag needs to be allowed.\n\nThe 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."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "vendor": "Twig",
                    "product": "twig/twig",
                    "collectionURL": "https://packagist.org",
                    "packageName": "twig/twig",
                    "repo": "https://github.com/twigphp/Twig",
                    "defaultStatus": "unaffected",
                    "versions": [
                        {
                            "version": "3.23.0",
                            "status": "affected",
                            "lessThan": "3.31.1",
                            "versionType": "semver"
                        }
                    ]
                }
            ],
            "problemTypes": [
                {
                    "descriptions": [
                        {
                            "lang": "en",
                            "cweId": "CWE-693",
                            "description": "CWE-693 Protection Mechanism Failure",
                            "type": "CWE"
                        }
                    ]
                },
                {
                    "descriptions": [
                        {
                            "lang": "en",
                            "cweId": "CWE-863",
                            "description": "CWE-863 Incorrect Authorization",
                            "type": "CWE"
                        }
                    ]
                }
            ],
            "metrics": [
                {
                    "format": "CVSS",
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "GENERAL"
                        }
                    ],
                    "cvssV4_0": {
                        "version": "4.0",
                        "vectorString": "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",
                        "baseScore": 5.3,
                        "baseSeverity": "MEDIUM"
                    }
                }
            ],
            "references": [
                {
                    "url": "https://symfony.com/cve-2026-133765",
                    "name": "CVE-2026-133765",
                    "tags": [
                        "vendor-advisory"
                    ]
                },
                {
                    "url": "https://github.com/twigphp/Twig/security/advisories/GHSA-ccrc-gqhf-3cxc",
                    "name": "GHSA-ccrc-gqhf-3cxc",
                    "tags": [
                        "vendor-advisory"
                    ]
                },
                {
                    "url": "https://github.com/twigphp/Twig/commit/6bcdbc3d4470dde23e3e2636e7053e0512387edd",
                    "tags": [
                        "patch"
                    ]
                }
            ],
            "credits": [
                {
                    "lang": "en",
                    "value": "Fabien Potencier",
                    "type": "remediation developer"
                },
                {
                    "lang": "en",
                    "value": "Jacko",
                    "type": "finder"
                },
                {
                    "lang": "en",
                    "value": "Inanna Malick",
                    "type": "finder"
                },
                {
                    "lang": "en",
                    "value": "Tudor-Andrei Oprea",
                    "type": "finder"
                }
            ],
            "source": {
                "advisory": "GHSA-ccrc-gqhf-3cxc",
                "discovery": "UNKNOWN"
            },
            "x_generator": {
                "engine": "symfony/ghsa-to-cve"
            }
        },
        "adp": [
            {
                "metrics": [
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "id": "CVE-2026-133765",
                                "role": "CISA Coordinator",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "partial"
                                    }
                                ],
                                "version": "2.0.3",
                                "timestamp": "2026-11-30T17:56:22.128866Z"
                            }
                        }
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2026-12-01T19:38:31.538Z"
                }
            }
        ]
    }
}