log4j RCE
See original GitHub issueHigly suggest reading this — https://www.rapid7.com/blog/post/2021/12/10/widespread-exploitation-of-critical-remote-code-execution-in-apache-log4j/ — and then updating the java
cmdline start examples and make a note to ensure folks use a safe Log4j JAR when building/using this.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:6 (4 by maintainers)
Top Results From Across the Web
APACHE LOG4J RCE - Variants and Updates | Checkmarx.com
This vulnerability was fixed in version 2.17.1 by limiting JNDI data source names to the java protocol and it was assigned the CVSS...
Read more >Exploiting, Mitigating, and Detecting CVE-2021-44228: Log4j ...
The vulnerability CVE-2021-44228, also known as Log4Shell, permits a Remote Code Execution (RCE), allowing the attackers to execute arbitrary ...
Read more >Apache Log4j Security Vulnerabilities
2 and 2.12.4) are vulnerable to a remote code execution (RCE) attack where an attacker with permission to modify the logging configuration file ......
Read more >Log4Shell: RCE 0-day exploit found in log4j, a popular Java ...
On Thursday, December 9th a 0-day exploit in the popular Java logging library log4j (version 2), called Log4Shell, was discovered that results ...
Read more >Log4j vulnerability explained: Prevent Log4Shell RCE ... - Snyk
When using a vulnerable version of Log4j, any incoming data that gets logged can lead to an RCE (remote code execution). When using...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi
Thanks for opening this issue, it’s good to have this discussion in public. We became aware of this issue yesterday morning and verified whether this affected ShinyProxy. We are convinced ShinyProxy is not affected.
You do not need to take any action.
However, the ShinyProxy Operator does uses log4j and was vulnerable. We released a new version of the operator yesterday that fixes the bug. Note that the attack surface of the operator is low, since it does not consume user-input (i.e. it only consumes YAML files created by a SysAdmin).
The next sections describe why ShinyProxy is not vulnerable, do not modify the pom.xml as below, this would make ShinyProxy vulnerable. This is just to show how to verify ShinyProxy is not vulnerable
First of all, ShinyProxy uses Spring Boot as framework. By default Spring Boot is not vulnerable, see this official Spring blog post https://spring.io/blog/2021/12/10/log4j2-vulnerability-and-spring-boot . In other words, Spring by default uses logback as logging backend instead of log4j. ShinyProxy does not override this logging backend. We confirmed this by running the following commands:
This gives the following output:
As you can see this does not include the vulnerable
log4j-core
dependency. According to the spring boot blog post, the other dependencies are not vulnerable. (they are not used for the logging itself, but only as API interface.)Besides this, we also did a manual check whether ShinyProxy is vulnerable. You can try this with the following steps:
wget https://shinyproxy.io/downloads/shinyproxy-2.6.0.jar
java -jar shinyproxy-2.6.0.jar
localhost:8080
in your browser${jndi:ldap://127.0.0.1:1389/a}
and any passwordWhen ShinyProxy would be vulnerable this would throw an exception, indicating that Java cannot make a connection. You can also verify that ShinyProxy does not try to make a connection by using tcpdump (e.g. using
sudo tcpdump -i lo port 1389
)Note that you can verify that this would be the case by changing the logging backend of ShinyProxy. You will need to modify the
pom.xml
of ShinyProxy, so that it contains:instead of
(See https://github.com/openanalytics/shinyproxy/blob/master/pom.xml#L66-L80) If you now re-try the above steps, you will see that ShinyProxy tries to connect to the LDAP server.
To conclude, we are convinced that ShinyProxy is not vulnerable. We will closely monitor the situation, and step in when new vulnerabilities are found.
Hi
A new update of the log4j library was released, because the previous fix was incomplete. Therefore a new version of the ShinyProxy Operator was released.
ShinyProxy itself remains unaffected.