Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agent does not protect against shaded jars #2

Open
JoeBeeton opened this issue Dec 15, 2021 · 1 comment
Open

Agent does not protect against shaded jars #2

JoeBeeton opened this issue Dec 15, 2021 · 1 comment

Comments

@JoeBeeton
Copy link

The agent checks for the fully qualified path to the JNDILookup class. Normally this will work fine, however if the application the agent is protecting was compiled using the maven-shade plugin the log4j class package paths could have been rewritten. So instead of
"org.apache.logging.log4j.core.lookup.JndiLookup"
It might become
"com.example.org.apache.logging.log4j.core.lookup.JndiLookup"
In this case the agent will fail to protect against the JNDI lookup vulnerability.

So instead of
return "org.apache.logging.log4j.core.lookup.JndiLookup".equals(target.getCanonicalName());
it was changed to check that the target.getCanonicalName() ends with "org.apache.logging.log4j.core.lookup.JndiLookup" this should protect against this vulnerability.

@wajda
Copy link

wajda commented Dec 16, 2021

Please take a look at the PR #3. It adds shading supports and a few other things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants