Support

Admin Tools

#30820 Protect against common file injection attacks

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by on Friday, 22 February 2019 17:17 CST

bytekultur
We are using YooTheme PageBuilder for some of our pages. To open the PageBuilder in the backend, I have to turn off "Protect against common file injection attacks" to avoid restricting it to load. Otherwise I get a 403 error.

I find it's a very unprecise response to turn the feature off allthogether, I'd much rather define an exception, as I think it's just a query parameter that invokes it. How could I find out without reading the whole code? Can you give me a hint?

THis is the URL called by PageBuilder (urldecoded for better reading):

https://mywebsite.com/administrator/index.php?p=customizer&option=com_ajax&style=9&return=https://mywebsite.com/administrator/index.php?option=com_templates&view=style&layout=edit&id=9&site=https://mywebsite.com/index.php

Kind regards,
Terry

--- byteKultur.net

 

nicholas
Akeeba Staff
Manager
You cannot add an exception to this feature, nor should you ever need to. The whole point of this feature is to prevent a whole class of rather sinister attacks which you'd open yourself to if you were to add an exception. Either adding an exception or disabling the feature altogether has the same result as far as security is concerned.

In fact, the URL you pasted shows that this is a glaring oversight in PageBuilder. Actually, two glaring oversights.

First, the return URL should never, EVER, be sent as a raw URL. Joomla is doing the right thing since 2007, sending return URLs as base64 encoded strings. Moreover, the encoded return URL should be relative, not absolute. This is not pedantic talk. There are real world security concerns by allowing full URLs the script will redirect to. So this is the first bug report you should file with Yoo.

The second problem is that they pass a full URL in the site parameter which is part of the return URL. Everything I described before applies here as well.

The correct solution is to file these bugs with Yoo and ask them to fix them. In the meantime you have to disable the "Protect against common file injection attacks" feature.

If you ask me, I would refrain from using an extension whose developers don't seem to understand the fundamentals of security. I don't say this lightly. For the last 10 years YooTheme has been a repeat offender with all of their extensions and templates, refusing to fix their issues. I understand why people use their software but I can not in good conscience, as someone you trust with your site security, condone their actions or recommend continuing using their software. Ultimately, it's your choice. You get to decide the level of acceptable risk.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

bytekultur
Thank you for your reply, Nicholas. I see what you mean. I agree that the feature should not be deactivated and after your explanation I am not surprised there isn't really a workaround better than turning it off.

This seems to appear only in the administrator interface, which isn't accessible by any one apart from super users or similar, but nontheless it should be improved.

I am more than happy to forward this to YooTheme's developers, maybe a repeated comment on it will help.

--- byteKultur.net

 

nicholas
Akeeba Staff
Manager
Feel free to ask them to change this.

Even if the issue "only" appears in the backend it's not in any way any less dangerous. In fact, that's exactly what attackers would target in a spear phishing campaign. They'd try to trick you into clicking a link whose address is on your site but which redirects you to their malicious site. A simple attack would be pretending to be a Joomla login page which would mislead you into thinking you got logged out of the site and you'd try to log back in (only for your credentials to be sent to the attacker). And that's just the simplest, most obvious attack mode.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

bytekultur
Yes, that makes sense and is quite obvious.
I didn't mean to marginalize it. I am filing a feature request, as I think (hope) does more than a bug report for something they might be calling "not a bug"

--- byteKultur.net

 

nicholas
Akeeba Staff
Manager
No problem. I didn't mean to be a pedant, I want to explain the security considerations behind me saying "no" to what on first blush is a reasonable feature request :)

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!