CVE-2026-133770
published low CVSS 4.0 · 2.1Sandboxed templates can rewrite application-owned `Markup` objects through their constructor
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
The sandbox allows every method of Twig\Markup objects, including their public constructor. A sandboxed template can therefore call __construct() on any Markup object that it reaches, and replace its content: {% do banner.__construct('<script>alert(1)</script>', 'UTF-8') %} A template gains nothing by rewriting its own output. The impact is on the Markup objects that come from the application and are also rendered elsewhere, like a global in a long-running worker. Their new content then ends up in trusted pages that aren't sandboxed. The sandbox no longer allows calling the constructor of Markup objects.
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
- 2.1 / 10
- Severity
- low
- Provider
- Symfony · cna
- Vector string
- CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/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-79 CWE-79 Improper Neutralization of Input During Web Page Generation
- CWE-863 CWE-863 Incorrect Authorization
References
3- https://github.com/twigphp/Twig/commit/97b2e40b1165e6a42a197843f96ccb0a55f46f34
- GHSA-r34x-hh9h-9q9c https://github.com/twigphp/Twig/security/advisories/GHSA-r34x-hh9h-9q9c
- CVE-2026-133770 https://symfony.com/cve-2026-133770
Provider assertions
2Symfony · cna
Sandboxed templates can rewrite application-owned `Markup` objects through their constructor
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- a6de3ca72688bbe1187f62b44ce2cafa6ef936c5c2e14c8965a77ff066a1ec62
- Ingested
- 01 Dec 2026, 19:45:57 UTC
- Source record
- Official CVE record