In other news: If I can intercept the log messages (unencrypted remote syslog, or log file public accessible, log messages also shown to the user) I can still just inject stuff like "${env:DATABASE_PASSWORD:-xxx}". Lots of people are only focusing on the aspect how this can be abused to inject arbitrary code, while it is actually a similar class like SQL injections: Blindly trusting user input instead of doing proper…
In 2.16.0 message lookups have been completely removed: https://github.com/apache/logging-log4j2/pull/623
Lookups now only work in configured patterns. Thats IMHO the way it should have been in the first place.