GitHub Advisoryadvisory · Packagist

GHSA-5mv2-rx3q-4w2v Code injection in Twig

HIGH Published 2022-02-10 Modified 2022-02-11 Official page ↗
Aliases
CVE-2022-23614
Ecosystem
Packagist
Packages
twig/twig
Severity
High
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weaknesses
CWE-74, CWE-94
Reviewed
2022-02-07

Affected packages

• Packagist twig/twig: >= 2.0.0, < 2.14.11 → fixed in 2.14.11 • Packagist twig/twig: >= 3.0.0, < 3.3.8 → fixed in 3.3.8

Description

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.

Related

Alias · CVE (1)

  • CVE-2022-23614 Twig is an open source template language for PHP. vulnerability

Weakness · CWE (2)

  • CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component weakness
  • CWE-94 Improper Control of Generation of Code weakness

References