Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 873412

Summary: dev-php/twig - validation bypass (CVE-2022-39261)
Product: Gentoo Security Reporter: filip ambroz <filip.ambroz>
Component: VulnerabilitiesAssignee: Gentoo Security <security>
Status: RESOLVED DUPLICATE    
Severity: minor CC: php-bugs
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://github.com/twigphp/Twig/security/advisories/GHSA-52m2-vc4m-jj33
Whiteboard: B4 [ebuild]
Package list:
Runtime testing required: ---

Description filip ambroz 2022-09-29 07:30:05 UTC
When using the filesystem loader to load 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).

Fix:
https://github.com/twigphp/Twig/commit/35f3035c5deb0041da7b84daf02dea074ddc7a0b
(fixed in version 1.44.7)

Please note:
1.x branch is not maintained anymore, a new versions have been released
Comment 1 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-09-30 14:16:10 UTC
Thank you for reporting! But already being tracked in bug 873364, I just missed adding the alias. Thanks!

*** This bug has been marked as a duplicate of bug 873364 ***
Comment 2 filip ambroz 2022-09-30 18:26:40 UTC
no problemo :)