Hi all,
The Apache Logging Services security team received a report about
lookups in Log4j Core 2.26.1. We do not consider it a vulnerability
and are publishing this summary in line with our reporting guidelines.
Report: (A) JavaLookup throws IllegalArgumentException for an unknown
key. The report described two scenarios: a missing ${ctx:...} value
falls back to a configuration property of the same name, which was
claimed to expose that property; and a configuration containing
${java:${ctx:...}} lets a ThreadContext value select an unknown key,
which was claimed to crash the logging thread. (B) A log message
containing ${event:Message} was claimed to cause a StackOverflowError
through recursive evaluation in ConfigurationStrSubstitutor.
Assessment: not a vulnerability. Lookup expressions can only come from
the configuration, which is trusted. (A) The fallback from ${ctx:...}
to a configuration property is documented behaviour, and protecting
log output is the operator's responsibility. The exception from
JavaLookup is caught by StrSubstitutor, which evaluates every lookup
expression, so logging continues and the expression is left as literal
text. (B) ConfigurationStrSubstitutor is only used while the
configuration is built, when no attacker-controlled data is available,
and the reported message does not cause a StackOverflowError. We
discourage logging secrets, for example through ${ctx:...} lookups.
The bug will be fixed in a future release.
Ramanathan Muthu
on behalf of the Apache Logging Services security team
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]