8.6
CWE
693
Advisory Published
Advisory Published
Updated

CVE-2024-45411: Twig has a possible sandbox bypass

First published: Mon Sep 09 2024(Updated: )

### Description Under some circumstances, the sandbox security checks are not run which allows user-contributed templates to bypass the sandbox restrictions. The security issue happens when all these conditions are met: * The sandbox is disabled globally; * The sandbox is enabled via a sandboxed `include()` function which references a template name (like `included.twig`) and not a `Template` or `TemplateWrapper` instance; * The included template has been loaded before the `include()` call but in a non-sandbox context (possible as the sandbox has been globally disabled). ### Resolution The patch ensures that the sandbox security checks are always run at runtime. ### Credits We would like to thank Fabien Potencier for reporting and fixing the issue.

Credit: security-advisories@github.com security-advisories@github.com

Affected SoftwareAffected VersionHow to fix
composer/twig/twig>=3.0.0<3.11.1
3.11.1
composer/twig/twig>=3.12.0<3.14.0
3.14.0
composer/twig/twig>=2.0.0<2.16.1
2.16.1
composer/twig/twig>=1.0.0<1.44.8
1.44.8
Symfony Twig>=1.0.0<1.44.8
Symfony Twig>=2.0.0<2.16.1
Symfony Twig>=3.0.0<3.14.0
>=1.0.0<1.44.8
>=2.0.0<2.16.1
>=3.0.0<3.14.0

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

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.
© 2024 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203