Log::Log4perl::Config->allow_code(0);
The cake is a lie.
The cake is a lie.
The cake is a lie.
| [reply] [d/l] |
As noted in the docs it's possible to disable this behavior with:
Log::Log4perl::Config->allow_code(0);
So it's insecure by default. Not nice.
And the same is true for the next documented feature, Log::Log4perl::Config->allowed_code_ops(...). Quoting the documentation:
By default, a value of '1' is assumed, which does a normal 'eval' without any restrictions.
Insecure by default, you have to lock it down explicitly. Again, not nice.
Alexander
--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
| [reply] [d/l] [select] |
If you can modify the config, you can modify the rest of the application.
True in Perl, Python, Javascript etc., not necessary in Java, C++, etc. - or at least harder.
It boils down to proper access permissions and running the application always with least privileges.
The core of Log4Shell is the unexpected or little known behaviour of the library to contact remote services.
Usually, I would expect from a configuration file to hold static read only data, not fractions of code that could be
executed - and that's also unexpected or little known Log::Log4perl behaviour.
| [reply] |
True in Perl
Do we agree that Log::Log4perl is Perl, though?
unexpected or little known Log::Log4perl behaviour
This doesn't seem to acknowledge your previous point that it's true in Perl.
| [reply] |