Skip to content
OpenAdvisories
High · 8.6 CVE-2024-45411 EUVD-2024-2735GHSA-6j75-5wfj-gh66

Twig has a possible sandbox bypass

Published Sep 9, 2024 · Updated Sep 16, 2024 · Assigned by GitHub_M

Description

Twig is a template language for PHP. Under some circumstances, the sandbox security checks are not run which allows user-contributed templates to bypass the sandbox restrictions. This vulnerability is fixed in 1.44.8, 2.16.1, and 3.14.0.

Affected products

VendorProductAffectedFixed
twigphp Twig > 1.0.0, < 1.44.8, > 2.0.0, < 2.16.1, > 3.0.0, < 3.14.0 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 php-twig 3.8.0-4 —
Debian 13 php-twig 3.8.0-4 —
Debian 12 php-twig 3.5.1-1+deb12u1 DSA-5771-1
Debian 11 php-twig 2.14.3-1+deb11u3 DLA-3888-1
ReleasePackageFixed inAdvisory
Ubuntu 24.04 LTS php-twig 3.8.0-2ubuntu1 USN-7549-1
Show 5 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 24.04 LTS php-twig 3.8.0-2ubuntu0.1~esm1 USN-7456-1
Ubuntu Pro 22.04 LTS php-twig 3.3.8-2ubuntu4+esm2 USN-7456-1
Ubuntu Pro 20.04 LTS php-twig 2.12.5-1ubuntu0.1~esm2 USN-7456-1
Ubuntu Pro 18.04 LTS twig No fix yet —
Ubuntu Pro 16.04 LTS twig No fix yet —

Affected packages

EcosystemPackageAffectedFixedRecord
Packagist twig/twig >= 1.0.0, < 1.44.8 1.44.8 GHSA-6j75-5wfj-gh66
Packagist twig/twig >= 2.0.0, < 2.16.1 2.16.1 GHSA-6j75-5wfj-gh66
Packagist twig/twig >= 3.12.0, < 3.14.0 3.14.0 GHSA-6j75-5wfj-gh66
Packagist twig/twig >= 3.0.0, < 3.11.1 3.11.1 GHSA-6j75-5wfj-gh66

Advisories 4

References