SecurityContext

CVE-2026-46638: Twig - Template Injection

  • Cve: CVE-2026-46638
  • Name: Twig - Template Injection
  • Description: Twig is a template language for PHP. Prior to 3.26.0, {% sandbox %}{% include %} can include a template that was previously loaded outside the sandbox without re-invoking checkSecurity(), allowing the cached template to use tags, filters, and functions that should have been denied by SecurityPolicy::checkSecurity(). This issue is fixed in version 3.26.0.
  • Impact: Attackers can bypass security policies to execute unauthorized template tags, filters, and functions, potentially leading to 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: none
  • Labels source: projectdiscovery
  • Severity: high
  • Cvss score: 8.1
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
  • Epss score: 0.00473
  • Epss percentile: 0.41404
  • 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-46638
  • 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: requirements, hackerone

Cwe

IdName
CWE-693Protection Mechanism Failure

References

Same in every row:

  • Source: nvd
UrlTags
https://github.com/twigphp/Twig/commit/819c6a89fe0f261b8555c4f4d5e27d31984223eaPatch
https://github.com/twigphp/Twig/security/advisories/GHSA-7fxw-r6jv-74c8Vendor Advisory
https://github.com/twigphp/Twig/releases/tag/v3.26.0Release Notes

Products

ProductAffectedPlatform boundSourcesUrl
symfony:twig< 3.26.0nonvd/v1/products/symfony/twig

Projects

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

Index

  • Repositories: 136
  • Repositories high signal: 93
  • 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