log4j The Little Bug With A Big Bite
Log4j, a widely used Java logging library, processed attacker-supplied text as a command, allowing remote code execution. An attacker could send a malicious string to a vulnerable application and potentially take full control of the server.
Published on systemweakness.com
Remember when a single tweet could crash the stock market? In December 2021, something similar happened — but with logging software.
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
Root cause
Likely, Log4j did not safely handle certain lookup strings in logged messages, so attacker-controlled input was interpreted as a command to fetch remote code.
Impact
Attackers could execute their own code and potentially take full control of the server, with no authentication needed.
What the attacker needed
Vulnerable Log4j version; attacker can send input that gets logged; no authentication needed
The fix
Apache released patches, and users should update Log4j to version 2.17.1 or newer, or disable JNDI lookups if updating is not immediately possible.
How it was found
- Send a malicious string of text to a website or application, for example in a username or search bar.
- If the system uses Log4j, it processes the text as a command instead of regular input.
- This allows attackers to execute their own code on the system.
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 tool that Java programs use to write down messages about what they are doing. The bug meant that if someone sent a special piece of text, the program would treat it as an instruction to fetch and run code from another computer. This let an attacker run their own programs on the server, which is very serious.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.