User tests: Successful: Unsuccessful:
Files and folders starting with dot didn't pass the regexpr test. So for example \var\www.tmp path didn't pass the test, which causes error during Joomla update.
Modified Reg Expressions to include files and / or folders starting with dot. The check was brought by this PR #32076 which adds InputFilter to temp path settings, however ignoring folders with dot at the beginning.
Go to Joomla settings and change your Temp path to some folder with dot at the beginning, for example \path_to_joomla.tmp (and create that folder of course). Go to Joomla update, and try to install the update.
Error is displayed, update is not installed.
No errror, update is installed.
None
Status | New | ⇒ | Pending |
Category | ⇒ | External Library Libraries Composer Change |
Paging @joomla/security as this was a security fix that is involved here @zero-24 #32076
This should not be merged until reviewed by the JSST.
@brianteeman There is no reason that those files and folders should be ommited. Especially folders. For example ".tmp" makes that folder hidden on Linux, not visible for example through FTP access.
@PhilETaylor I know you can switch on to show it, but if you just want to keep your view clean, you can easily hide it with dot.
Also this repo is not the place for changes to libraries/vendor/joomla/filter/src/InputFilter.php
Those should be made in the framework repo at https://github.com/joomla-framework/input
This PR should be closed, and if you really want to propose it, and have it commented on by the @joomla/security team, then https://github.com/joomla-framework/input is the correct place.
or maybe you meant to update this file? libraries/src/Filter/InputFilter.php
libraries/src/Filter/InputFilter.php
only calll parent::clean function. To modify it would mean to copy all the code from libraries/vendor/joomla/filter/src/InputFilter.php
...
How to get comment from @joomla/security team? Here, or need to be contacted other way?
Ok, thanks. The PR should be propably made to https://github.com/joomla-framework/filter package, or as you proposed, to 'libraries/src/Filter/InputFilter.php', or maybe directly to Model of Joomla Update component. I contacted security team to review this and give advice.
Generally this is related to issue you mentioned here #32567 but on other place of Joomla.
@n3t Your pull request is wrong for following reasons:
/some/folder/../../../evil.php
on Linux, which means breaking out of the Joomla root. This open a security hole and so cannot be accepted. You can easily very that with one of the many available sites for online execution of preg_match. Just Google for it.I suggest you open an issue with a feature request in the https://github.com/joomla-framework/filter repository. The feature request should clearly describe your requirement (to be able to use folder and file names starting with a dot).
And please don't contact anymore the SST for discussing this PR via their email for reporting security issues. The form which you have used is ONLY for reporting security issues. @PhilETaylor had already notified the right person in his comment here #33151 (comment) .
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-04-16 08:34:50 |
Closed_By | ⇒ | richard67 | |
Labels |
Added:
?
?
|
@richard67 Thanks for your review, sorry for using contact form, I did it just because asked to. I will raise an issue on framework. Anyway, checking double dots in tmp folder set in configuration.php doesn't bring any real security in Joomla update process, as I can easily go to configuration, and set directly /other/folder/evil.php
, which will pass the test as correct path...
thats good as they are not supposed to