3 ms·
> A project with a footprint like Log4j is not possible to avoid as a transient dependency even if you don’t directly import it. But it’s often still possible
by layer8 5y ago
> A project with a footprint like Log4j is not possible to avoid as a transient dependency even if you don’t directly import it.
But it’s often still possible to use a different backend, via the Log4j to SLF4J adapter: https://logging.apache.org/log4j/2.x/log4j-to-slf4j/ https://logging.apache.org/log4j/2.x/log4j-to-slf4j/
- shartte 5y agoI believe this is the default in Spring Boot. Logback is used by their starters (see https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#features.logging https://docs.spring.io/spring-boot/docs/current/reference/ht...).
- zorr 5y agoYes, recent Spring-boot projects include log4j-to-slf4j, slf4j-api, logback-core and logback-classic which AFAIK are not vulnerable.
- staticassertion 5y agoDoes this routing happen before or after log4j would be exploitable? Like if log4j is still running its parser and doing all the crazy stuff, but then routes to some other logger, it doesn't matter.
- layer8 5y agoThe routing happens before. The vulnerability is due to processing in the log4j back-end, after normal message formatting.
- staticassertion 5y agoGot it, thanks.