CVE-2026-24425: Twig - Sandbox Bypass & Remote Code Execution
- Cve: CVE-2026-24425
- Name: Twig - Sandbox Bypass & Remote Code Execution
- Description: Twig versions 2.16.x and 3.9.0 through 3.25.x contain a sandbox bypass vulnerability when using a SourcePolicyInterface that allows attackers with template rendering capabilities to pass arbitrary PHP callables to sort, filter, map, and reduce filters. Attackers can exploit the runtime check that fails to use the current template source to bypass sandbox restrictions and execute arbitrary code when the sandbox is enabled through a source policy rather than globally.
- Impact: Attackers with template rendering capabilities can execute arbitrary code, potentially leading to full system compromise.
- Remediation: Update to a version later than 3.25.x or the latest available version.
- Vulnerability type: template_injection
- Vulnerability impact: remote_code_execution
- Requirement type: logged_in
- Requirements: Attacker needs template rendering capabilities
- Labels source: projectdiscovery
- Severity: critical
- Cvss score: 9.9
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
- Epss score: 0.00758
- Epss percentile: 0.5596
- Assignee: [email protected]
- Published at: 2026-05-20T14:16:38Z
- Age in days: 188
- Modified at: 2026-11-17T23:17:57Z
- Patch available: yes
- References total: 3
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-24425
- Nvd status: analyzed
- Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
- Not known: hackerone
Cwe
| Id | Name |
|---|---|
| CWE-693 | Protection Mechanism Failure |
References
Same in every row:
- Source: nvd
| Url | Tags |
|---|---|
| https://github.com/twigphp/Twig/security/advisories/GHSA-2q52-x2ff-qgfr | Vendor Advisory |
| https://www.vulncheck.com/advisories/twig-x-x-sandbox-bypass-via-sourcepolicyinterface | Third Party Advisory |
| https://github.com/twigphp/Twig/releases/tag/v3.26.0 | Product, Release Notes |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| symfony:twig | >= 3.9.0, < 3.26.0; >= 2.16.0, <= 2.16.1 | no | nvd | /v1/products/symfony/twig |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| twigphp/Twig | package, releases, security_advisory | yes | /v1/repositories/twigphp/Twig |
Index
- Repositories: 24
- Repositories high signal: 19
- Packages: 1
Exploitation
- Remote: yes
- Authentication required: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts