How do I actually determine whether a vulnerable Java logging library is present anywhere on my server?
A widely reported vulnerability in a Java logging library has me trying to work out whether my servers are affected, and I am finding that a surprisingly hard question to answer.
The machines run a mainstream Linux distribution. I have installed a lot of third-party software over the years and I genuinely do not know what any of it bundles internally.
Is there a command that gives a reliable answer? What I keep finding is advice to search for a filename, which feels like it would miss anything bundled inside another archive.
@distro_dana · 17h ago
The layers, in the order I would run them:
Ask the package manager first. Whatever your distribution uses, query for the package by name. This catches anything installed the supported way and takes seconds. It also tells you the version, which the filesystem alone will not.
Search the filesystem for jar files matching the library name. Update your file index first if you are using an indexed search, otherwise you are querying yesterday's disk. Expect this to find vendor-bundled copies the package manager missed.
Search inside archives. This is the step people skip and it is where the real findings are. There are purpose-built scanners for exactly this problem that walk nested archives and check the classes inside rather than the filenames outside. Use one rather than writing your own — the nesting gets deep and the edge cases are numerous.
Ask what is actually running. List the running Java processes and look at their classpaths. A vulnerable jar sitting on disk that nothing loads is a lower priority than one in a live process.
Reply
Report