cve.bz

CVE-2026-46636 twigphp twig

8.7 highEPSS 0.6%

High (8.7) in twigphp twig. EPSS 0.6% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 4.0

8.7 high
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.6% (unchanged from 0.6% a week ago; 0.6% 30 days ago) estimated probability of exploitation activity in the next 30 days; 48th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: yes · Technical impact: partial, assessed 2026-09-08. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-1336 Improper Neutralization of Special Elements Used in a Template Engine
Published
Modified
NVD analysis
Awaiting analysis
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-46636 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-46636?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-46636?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-46636 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
twigphp Twig>= 1.0.0, < 3.27.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12php-twigno fix listedDEBIAN-CVE-2026-46636
Debian13php-twig3.27.0-0+deb13u1DEBIAN-CVE-2026-46636 DSA-6311-1
Debian14php-twig3.27.0-1DEBIAN-CVE-2026-46636
Ubuntu25.10, 26.10, Pro:20.04:LTS and 3 morephp-twigno fix listedUBUNTU-CVE-2026-46636

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Important.

Red Hat's statement

This vulnerability is evaluated as an Important severity risk because it circumvents template sandbox restrictions, allowing untrusted users to execute public methods on exposed objects without prior privilege escalation. Under normal operation, triggering this behavior requires the host application to explicitly enable sandboxing while passing custom markup objects into the rendering context. Red Hat Enterprise products do not deploy this component in standard configurations, significantly curtailing exposure across supported environments.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-46636.

References

Check your stackJSON