-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[5.2] Harden FormattedTextLogger against object injection attacks #44428
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested successfully as described.
Log Entries before and after identical.
@ramalama can you open https://issues.joomla.org/tracker/joomla-cms/44428 and
Now the test count as successfull. |
I have tested this item ✅ successfully on 4982fc9 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44428. |
The test instruction doesn't appear to run the new method. Please confirm. |
As described, there is no option to execute the method in core. That’s why the purpose of the instructions is to confirm that legitimate use cases of that class are unaffected. |
I have tested this item ✅ successfully on 2ed7d84 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44428. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44428. |
Thank you for your contribution! |
Summary of Changes
The current implementation of the FormattedTextLogger class creates a potential code execution vulnerability if either Joomla core itself or a third party extension would have an object injection vulnerability via unserialization of user supplied input. This PR adds an exception message for that very specific case, preventing that such an attack payload would be written.
YES, I'm aware that this is a theoretical b/c break. However, weighting the pros and cons of the current implementation, I think that it's a useful change nonetheless.
Credits:
The general mechanism was reported by Drew Webber / mcdruid
Testing Instructions
Apply patch, create a log message by trying to log in into the administrator site with wrong credentials.
Actual result BEFORE applying this Pull Request
Log file is written
Expected result AFTER applying this Pull Request
Log file is written
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed