CVE-2026-46627: Twig: Sandbox resource exhaustion via unbounded `for` / `range()`

Published Jul 14, 2026
·
Updated

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.

Affected Software

2 affected components
Twig Twig<3.26.0
Symfony Twig<3.26.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Twig (PHP template language) to a version that resolves this vulnerability.

    Fixed in 3.26.0

Event History

Jul 14, 2026
CVE Published
via MITRE·09:15 PM
Data Sourced
via MITRE·09:15 PM
DescriptionWeakness
Data Sourced
via NVD·10:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-46627?

CVE-2026-46627 has a high severity rating of 7.1 according to the CVSS scoring system.

2

How do I fix CVE-2026-46627?

To fix CVE-2026-46627, upgrade Twig to version 3.26.0 or later.

3

What is the impact of CVE-2026-46627?

CVE-2026-46627 allows untrusted templates to cause resource exhaustion, leading to potential denial of service.

4

Which versions of Twig are affected by CVE-2026-46627?

All versions of Twig prior to 3.26.0 are affected by CVE-2026-46627.

5

Is Symfony Twig affected by CVE-2026-46627?

Yes, Symfony Twig is affected by CVE-2026-46627, as it relies on the Twig template language.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203