CVE-2026-46636CWE-1336

CVE-2026-46636

published September 5, 2026

CVSS
8.7
EPSS
0%
Percentile
28.8
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS
8.7 · NONE
CVSS v4.0
8.7 · CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
EPSS
0.00358 · 28.8th percentile
Weakness
CWE-1336 · Improper Neutralization of Special Elements Used in a Template Engine
Published
2026-09-05T02:17Z
References (5)
EPSS history
Timeline
  • 06 SEP 03:32Z
    EPSS moved — → 0%
    epss
  • 04 SEP 22:07Z
    Twig: Sandbox method allowlist bypass via `Markup` subclass
    cvelistv5