Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 873412 - dev-php/twig - validation bypass (CVE-2022-39261)
Summary: dev-php/twig - validation bypass (CVE-2022-39261)
Status: RESOLVED DUPLICATE of bug 873364
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo Security
URL: https://github.com/twigphp/Twig/secur...
Whiteboard: B4 [ebuild]
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-29 07:30 UTC by filip ambroz
Modified: 2022-09-30 18:26 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 :)