VDB
Sign up
HIGH8.8

GHSA-5mv2-rx3q-4w2v

Code injection in Twig

Quick fix

GHSA-5mv2-rx3q-4w2v — twig/twig: upgrade to the fixed version with the command below.

composer require twig/twig:^2.14.11

Details

# Description

When in a sandbox mode, the `arrow` parameter of the `sort` filter must be a closure to avoid attackers being able to run arbitrary PHP functions.

# Resolution

We now disallow calling non Closure in the `sort` filter like we already did for some other filters.

# Credits

We would like to thank Marlon Starkloff for reporting the issue and Fabien Potencier for fixing the issue.

Are you affected?

Enter the version of the package you're using.

Affected packages

Packagist/twig/twig
Introduced in: 2.0.0Fixed in: 2.14.11
Fixcomposer require twig/twig:^2.14.11
Packagist/twig/twig
Introduced in: 3.0.0Fixed in: 3.3.8
Fixcomposer require twig/twig:^3.3.8

References