Vulnerabilidades / CVE-2022-23614

crítica

CVE-2022-23614

twig: Disallow non closures in `sort` filter when the sandbox mode is enabled

Publicada Modificada CWE 74, 94
En la Trivy database desde, como mínimo, el 24 oct 2026, 07:11 UTCNo consta cuándo entró antes de ese build.

Severidad por fuente

NVD9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GHSA8.8CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Red Hat8.8CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

La etiqueta propia de Trivy es CRITICAL. Crítica según NVD. Más baja según GHSA (alta), Red Hat (media), Ubuntu (media).

Descripción

Twig is an open source template language for PHP. 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. In affected versions this constraint was not properly enforced and could lead to code injection of arbitrary PHP code. Patched versions now disallow calling non Closure in the `sort` filter as is the case for some other filters. Users are advised to upgrade.

Paquetes afectados y versiones corregidas

FuentePaqueteCorregido en
composer::GitHub Security Advisory Composertwig/twig2.14.11, 3.3.8
composer::PHP Security Advisories Databasetwig/twigsin corrección indicada
debian 11php-twig2.14.3-1+deb11u1
debian 12php-twig3.3.8-1
debian 13php-twig3.3.8-1
debian 14php-twig3.3.8-1
echophp-twig3.3.8-1
ubuntu 20.04-ESMphp-twig2.12.5-1ubuntu0.1~esm1

Referencias

Las 19 referencias

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.