CVE-2026-48807
published high CVSS 4.0 · 7.1Twig: Sandbox `__toString()` policy bypass via `Traversable` in `join` and `replace` filters
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| twigphp | — | Twig< 3.27.0 | Affected | Not stated | GitHub_M |
Description
Twig is a template language for PHP. Prior to 3.27.0, the sandbox __toString() checks do not fully cover Traversable values passed to join and replace filters or operands evaluated by the in and not in operators, allowing contained Stringable objects to be coerced to strings without consulting the sandbox policy. This issue is fixed in version 3.27.0.
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
- 7.1 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| twigphp | Twig | < 3.27.0 (affected) | GitHub_M · cna |
Weaknesses
2- CWE-693 CWE-693: Protection Mechanism Failure
- CWE-863 CWE-863: Incorrect Authorization
References
2Provider assertions
2GitHub_M · cna
Twig: Sandbox `__toString()` policy bypass via `Traversable` in `join` and `replace` filters
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 6b7ff2e4c997d72bd64756310634671fd19353ed2ec225df2ca6516bedb8071f
- Ingested
- 23 Sep 2026, 09:17:37 UTC
- Source record
- Official CVE record