log4j Vulnerability Cve 2021 44228
The Log4j2 logging library processes user-controlled log messages and, when message lookup substitution is enabled, can be tricked into fetching and executing remote Java code. An attacker who can control log data could therefore run arbitrary code on the vulnerable server.
Log4j2 is a open source java-based logging framework commonly incorporated into Apache web server and spring-boot web applications
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker could execute arbitrary code on the vulnerable server, and many cloud and Java-based services were reported as affected.
What the attacker needed
Server runs vulnerable Log4j2 version; attacker can control log messages or parameters; message lookup substitution enabled
The fix
The vulnerability was fixed in Log4j 2.15.0, and message lookups can be disabled as a mitigation.
How it was found
- User data is sent to the server.
- The server logs the request data containing the malicious payload.
- The payload triggers Log4j to make a JNDI request to the attacker's server.
- The response contains a path to a remote Java class file, which is injected into the server process.
- The injected payload triggers a second stage and allows arbitrary code execution.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Log4j is a common Java tool that writes down messages about what a program is doing. A flaw meant that if an attacker could get their text into those messages, the tool would follow instructions in the text and download and run code from the attacker's server. This gave the attacker control of the machine.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.