CVE-2026-133767
published medium CVSS 4.0 · 5.3Sandbox allow-list and `__toString()` bypass via a dynamic `embed` parent expression
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Twig | — | twig/twig0 to < 3.31.1 · Other versions: unaffected | Affected | Not stated | Symfony |
Description
When the parent of an embed tag was an expression other than a string or a variable, the sandbox didn't see that expression. The functions, filters and tests of the expression weren't checked against the policy, and neither were its conversions to strings. A sandboxed template allowed to use embed could therefore call any function, filter or test, and any __toString() method: {% embed 'leak_' ~ app_secret() %}{% endembed %} Method calls and property reads were not affected, since they're checked at runtime. The sandbox now checks the parent expression of embed like any other expression of the template.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 5.3 / 10
- Severity
- medium
- Provider
- Symfony · cna
- Vector string
- CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
- Scenarios
- en: GENERAL
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Twig | twig/twig | 0 to < 3.31.1 (affected · semver)Default: unaffected | Symfony · cna |
Weaknesses
2- CWE-693 CWE-693 Protection Mechanism Failure
- CWE-863 CWE-863 Incorrect Authorization
References
3- https://github.com/twigphp/Twig/commit/fe395ad247b8e6c6f34f39bc211119ecb11f80b3
- GHSA-fmp9-6wxr-cfmq https://github.com/twigphp/Twig/security/advisories/GHSA-fmp9-6wxr-cfmq
- CVE-2026-133767 https://symfony.com/cve-2026-133767
Provider assertions
2Symfony · cna
Sandbox allow-list and `__toString()` bypass via a dynamic `embed` parent expression
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 8a1aff4d7baf42fbac7fcf71e3c76bafd31eb4dec22e0c63d48e9546d30e7f83
- Ingested
- 01 Dec 2026, 16:54:56 UTC
- Source record
- Official CVE record