Skip to main content

Twig CVE-2026-46627

| EUVDEUVD-2026-44559 HIGH
Uncontrolled Resource Consumption (CWE-400)
2026-07-14 security-advisories@github.com
7.1
CVSS 4.0 · Vendor: github
Share

Severity by source

Vendor (github) PRIMARY
7.1 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
vuln.today AI
6.5 MEDIUM

Network-reachable, low-complexity DoS requiring template-submission privileges (PR:L); no confidentiality or integrity impact, availability-only (A:H), scope unchanged.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
X

Lifecycle Timeline

4
Source Code Evidence Fetched
Jul 22, 2026 - 12:01 vuln.today
Analysis Generated
Jul 22, 2026 - 12:01 vuln.today
Patch available
Jul 14, 2026 - 23:20 EUVD
CVE Published
Jul 14, 2026 - 22:16 cve.org
HIGH 7.1

DescriptionCVE.org

Twig is a template language for PHP. Prior to 3.26.0, the Twig sandbox does not prevent a template from consuming CPU, memory, or wall-clock time, even under the strictest allow-list, allowing untrusted templates to cause resource exhaustion. This issue is addressed in version 3.26.0 by documenting that the sandbox does not protect against resource exhaustion.

AnalysisAI

Denial-of-service via resource exhaustion affects the Twig templating engine for PHP prior to 3.26.0, where the sandbox - even under its strictest allow-list - does not bound CPU, memory, or wall-clock consumption of a rendered template. Any application that renders untrusted or user-supplied templates can be forced to exhaust host resources through large ranges, nested loops, recursive macros, or expensive filters. There is no public exploit identified and it is not in CISA KEV; EPSS is low (0.33%), and the vendor's 3.26.0 'fix' only documents the limitation rather than adding a code-level control.

Technical ContextAI

Twig compiles template source into PHP and offers a sandbox mode to safely render untrusted templates by restricting which tags, filters, functions, methods, and properties are reachable. The sandbox is an access-control boundary, not a resource-control boundary - it governs WHAT a template may touch, not HOW MUCH compute it may consume. This maps directly to CWE-400 (Uncontrolled Resource Consumption): constructs that are individually permitted (loops, ranges, string operations, macro recursion, includes) can be composed to burn unbounded CPU/memory/time. The affected component per CPE is cpe:2.3:a:symfony:twig, i.e. the twigphp/Twig library, historically maintained under the Symfony ecosystem and embedded in frameworks such as Symfony and Drupal.

RemediationAI

Vendor-released patch: 3.26.0 - but note this release is a documentation change (commit 6bfa285e2f98651adb7aa480bf83a741d154f09f updates doc/sandbox.rst), not a functional mitigation; upgrading does not add any resource limit. Because Twig explicitly declines to enforce limits at the engine level (any built-in cap being 'arbitrary and trivial to work around'), the effective remediation is process-level containment of untrusted template rendering: run rendering in an isolated worker/process with hard caps via PHP settings (memory_limit, max_execution_time) and OS controls (ulimit, cgroups CPU/memory quotas), and enforce request timeouts at the web/app server. Where feasible, avoid rendering attacker-controlled templates at all, or constrain inputs (limit loop/range sizes, template length, include depth) before rendering. Trade-off: aggressive memory_limit/timeout caps can terminate legitimate large renders, so tune per workload. See GHSA-923g-j88x-j34q for the vendor's guidance to 'contain them at the process level rather than at the template engine level.'

CVE-2015-4050 MEDIUM POC
4.3 Jun 02

FragmentListener in the HttpKernel component in Symfony 2.3.19 through 2.3.28, 2.4.9 through 2.4.10, 2.5.4 through 2.5.1

CVE-2019-10910 CRITICAL POC
9.8 May 16

In Symfony before 2.7.51, 2.8.x before 2.8.50, 3.x before 3.4.26, 4.x before 4.1.12, and 4.2.x before 4.2.7, when servic

CVE-2018-13818 CRITICAL POC
9.8 Jul 10

Twig before 2.4.4 allows Server-Side Template Injection (SSTI) via the search search_key parameter. Rated critical sever

CVE-2025-64500 HIGH POC
7.3 Nov 12

Symfony is a PHP framework for web and console applications and a set of reusable PHP components. Rated high severity (C

CVE-2026-24739 MEDIUM POC
6.3 Jan 28

Symfony versions up to 5.4.51 contains a vulnerability that allows attackers to operations being performed on an uninten

CVE-2018-12040 MEDIUM POC
6.1 Jun 13

Reflected Cross-site scripting (XSS) vulnerability in the web profiler in SensioLabs Symfony 3.3.6 allows remote attacke

CVE-2016-2403 CRITICAL
9.8 Feb 07

Symfony before 2.8.6 and 3.x before 3.0.6 allows remote attackers to bypass authentication by logging in with an empty p

CVE-2024-51736 CRITICAL
9.8 Nov 06

Symphony process is a module for the Symphony PHP framework which executes commands in sub-processes. Rated critical sev

CVE-2019-18889 CRITICAL
9.8 Nov 21

An issue was discovered in Symfony 3.4.0 through 3.4.34, 4.2.0 through 4.2.11, and 4.3.0 through 4.3.7. Rated critical s

CVE-2019-11325 CRITICAL
9.8 Nov 21

An issue was discovered in Symfony before 4.2.12 and 4.3.x before 4.3.8. Rated critical severity (CVSS 9.8), this vulner

CVE-2019-10913 CRITICAL
9.8 May 16

In Symfony before 2.7.51, 2.8.x before 2.8.50, 3.x before 3.4.26, 4.x before 4.1.12, and 4.2.x before 4.2.7, HTTP Method

CVE-2018-11407 CRITICAL
9.8 Jun 13

An issue was discovered in the Ldap component in Symfony 2.8.x before 2.8.37, 3.3.x before 3.3.17, 3.4.x before 3.4.7, a

Share

CVE-2026-46627 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy