CVE-2022-39261 – Twig may load a template outside a configured directory when using the filesystem loader
https://notcve.org/view.php?id=CVE-2022-39261
Twig is a template language for PHP. Versions 1.x prior to 1.44.7, 2.x prior to 2.15.3, and 3.x prior to 3.4.3 encounter an issue when the filesystem loader loads templates for which the name is a user input. It is possible to use the `source` or `include` statement to read arbitrary files from outside the templates' directory when using a namespace like `@somewhere/../some.file`. In such a case, validation is bypassed. • https://github.com/twigphp/Twig/commit/35f3035c5deb0041da7b84daf02dea074ddc7a0b https://github.com/twigphp/Twig/security/advisories/GHSA-52m2-vc4m-jj33 https://lists.debian.org/debian-lts-announce/2022/10/msg00016.html https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2OKRUHPVLIQVFPPJ2UWC3WV3WQO763NR https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/AUVTXMNPSZAHS3DWZEM56V5W4NPVR6L7 https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedorapr • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') •
CVE-2022-23614 – Code injection in Twig
https://notcve.org/view.php?id=CVE-2022-23614
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. • https://github.com/davwwwx/CVE-2022-23614 https://github.com/4rtamis/CVE-2022-23614 https://github.com/twigphp/Twig/commit/22b9dc3c03ee66d7e21d9ed2ca76052b134cb9e9 https://github.com/twigphp/Twig/commit/2eb33080558611201b55079d07ac88f207b466d5 https://github.com/twigphp/Twig/security/advisories/GHSA-5mv2-rx3q-4w2v https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/I2PVV5DUTRUECTIHMTWRI5Z7DVNYQ2YO https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OTN4 • CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') CWE-94: Improper Control of Generation of Code ('Code Injection') •
CVE-2019-9942
https://notcve.org/view.php?id=CVE-2019-9942
A sandbox information disclosure exists in Twig before 1.38.0 and 2.x before 2.7.0 because, under some circumstances, it is possible to call the __toString() method on an object even if not allowed by the security policy in place. Existe una divulgación de información del sandbox en Twig, en versiones anteriores a la 1.38.0 y versiones 2.x anteriores a la 2.7.0 ya que, en ciertas circunstancias, es posible llamar al método __toString() en un objeto incluso aunque la política de seguridad existente no lo permita. • https://github.com/twigphp/Twig/commit/eac5422956e1dcca89a3669a03a3ff32f0502077 https://seclists.org/bugtraq/2019/Mar/60 https://symfony.com/blog/twig-sandbox-information-disclosure https://www.debian.org/security/2019/dsa-4419 •
CVE-2018-13818
https://notcve.org/view.php?id=CVE-2018-13818
Twig before 2.4.4 allows Server-Side Template Injection (SSTI) via the search search_key parameter. NOTE: the vendor points out that Twig itself is not a web application and states that it is the responsibility of web applications using Twig to properly wrap input to it ** EN DISPUTA ** Twig en versiones anteriores a la 2.4.4 permite Server-Side Template Injection (SSTI) mediante el parámetro de búsqueda search_key. NOTA: el fabricante señala que Twig no es una aplicación web y sostiene que es la responsabilidad de las aplicaciones web que emplean Twig envolver correctamente las entradas que se le proporcionan. • https://github.com/twigphp/Twig/blob/2.x/CHANGELOG https://github.com/twigphp/Twig/commit/eddb97148ad779f27e670e1e3f19fb323aedafeb https://github.com/twigphp/Twig/issues/2743 https://mobile.twitter.com/jameel_nabbo/status/1032593354704515072?s=20 https://www.exploit-db.com/exploits/44102 • CWE-94: Improper Control of Generation of Code ('Code Injection') •
CVE-2015-7809
https://notcve.org/view.php?id=CVE-2015-7809
The displayBlock function Template.php in Sensio Labs Twig before 1.20.0, when Sandbox mode is enabled, allows remote attackers to execute arbitrary code via the _self variable in a template. La función displayBlock en Template.php en Sensio Labs Twig en versiones anteriores a 1.20.0 cuando el modo Sandbox está habilitado, permite a atacantes remotos ejecutar código arbitrario a través de la variable _self en una plantilla. • http://openwall.com/lists/oss-security/2015/08/21/3 http://openwall.com/lists/oss-security/2015/10/11/2 http://symfony.com/blog/security-release-twig-1-20-0 http://www.debian.org/security/2015/dsa-3343 https://github.com/fabpot/Twig/commit/30be07759a3de2558da5224f127d052ecf492e8f https://github.com/twigphp/Twig/pull/1759 • CWE-264: Permissions, Privileges, and Access Controls •