SecurityContext

CVE-2026-46634: Twig - Template Injection

  • Cve: CVE-2026-46634
  • Name: Twig - Template Injection
  • Description: Twig is a template language for PHP. From 3.9.0 until 3.26.0, template_from_string() compiles an inner template under a synthesized __string_template__<hash> name that can fall outside a SourcePolicyInterface sandbox decision, allowing a sandboxed template that can call template_from_string and include to render an inner template without security policy enforcement. This issue is fixed in version 3.26.0.
  • Impact: Sandboxed attackers can bypass security policies to render unauthorized templates, potentially leading to unauthorized code execution or data exposure.
  • Remediation: Update to version 3.26.0 or later.
  • Vulnerability type: template_injection
  • Vulnerability impact: remote_code_execution
  • Requirement type: logged_in
  • Requirements: Attacker needs to run sandboxed templates
  • Labels source: projectdiscovery
  • Severity: critical
  • Cvss score: 9.8
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Epss score: 0.00616
  • Epss percentile: 0.5022
  • Assignee: [email protected]
  • Published at: 2026-07-14T22:16:56Z
  • Age in days: 133
  • Modified at: 2026-10-24T22:10:00Z
  • Patch available: yes
  • References total: 3
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-46634
  • 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

IdName
CWE-693Protection Mechanism Failure

References

Same in every row:

  • Source: nvd
UrlTags
https://github.com/twigphp/Twig/commit/1cde8f2b62463f85d47995fc25f8241cb409d915Patch
https://github.com/twigphp/Twig/security/advisories/GHSA-24x9-r6q4-q93wVendor Advisory
https://github.com/twigphp/Twig/releases/tag/v3.26.0Release Notes

Products

ProductAffectedPlatform boundSourcesUrl
symfony:twig>= 3.9.0, < 3.26.0nonvd/v1/products/symfony/twig

Projects

RepositoryLink kindsIndexedUrl
twigphp/Twigcommit, fix, package, releases, security_advisoryyes/v1/repositories/twigphp/Twig

Index

  • Repositories: 22
  • Repositories high signal: 17
  • Packages: 1

Exploitation

  • Remote: yes
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts