Skip to content

Detecting Apache Log4j vulnerability presence in gradle transitive dependencies

There is a recent vulnerability in log4j which has criticality score of 10

How to check the presence of Log4j vulnerable versions in gradle so that it would list all the dependencies including the transitive dependencies?



We can use

./gradlew -q dependencies

To list the dependency tree. It will list all dependencies with their respective version. Since this output can be lengthy, we can filter it down with grep:

./gradelw -q dependencies | grep -i log4j

This will list all log4j-dependencies with their respective version.