Read the docs
TI-2026-34288 Aliases CVE-2026-46636

Twig: Sandbox method allowlist bypass via `Markup` subclass

Priority MEDIUM 44CWE-1336Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Attack requirements
None
Impact type
Code execution
Confidentiality · integrity · availability
High · None · None
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-1336.

Summary

Twig is a template language for PHP. From version 1.0.0 to before version 3.27.0, SecurityPolicy::checkMethodAllowed() unconditionally whitelists all method calls on instances of Twig\Markup. Twig\Markup is not final, so subclasses inherit the bypass. An application that passes an object of a Markup-derived class into a sandboxed template (typically to mark a chunk of HTML as safe) inadvertently exposes every public method of that subclass to template authors, regardless of the configured allowedMethods list. This issue has been patched in version 3.27.0.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.0057 47th percentileScored 2026-11-07
Fix Fixed Twig (twigphp): 3.27.0

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
Yes
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
symfonyTwig1.0.0 to before 3.27.03.27.0Patch availableCNA
  • Twig Vendorsymfony Affected 1.0.0 to before 3.27.0 Fixed in 3.27.0 Patch available CNA

CPE names Threatist (inferred) · 1

Inferred from how NVD named this product before; not given by a source.

CPEVersionsRoleVendor
cpe:2.3:a:symfony:twig:*:*:*:*:*:*:*:*——symfony
  • cpe:2.3:a:symfony:twig:*:*:*:*:*:*:*:* Versions — — ·symfony

Remediation

  • Fix · CNA Twig (twigphp) Fixed in 3.27.0

Vendor assessments

Red Hat

Red Hat's page for this CVE →

Not affected: 1 product
  • Red Hat

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-46636

References

  • TI-2024-33775 Ability to change environment from query in symfony/runtime CVSS 3.1HIGH 7.3
  • TI-2026-34283 Twig: The `spaceless` filter implicitly marks its output as safe CVSS 4.0MEDIUM 5.1
  • TI-2022-07667 Code injection in Twig CVSS 3.1CRITICAL 9.8
  • TI-2018-10028 Twig before 2.4.4 allows Server-Side Template Injection (SSTI) via the search search_key… CVSS 3.0CRITICAL 9.8
  • TI-2026-35851 Incorrect authorization in symfony CVSS 4.0HIGH 8.7
  • TI-2026-35264 Improper input validation in symfony CVSS 4.0HIGH 8.3
See all 94 →

Sources