A critical vulnerability in the open-source logging software Apache Log4j 2 is fueling a chaotic race in the cybersecurity world, with the Apache Software Foundation (ASF) issuing an emergency security update as bad actors searched for vulnerable servers.
Log4j 2, developed by the ASF, is a widely used Java package that enables logging in an array of popular applications. The bug, tracked as CVE-2021-44228, is a zero-day vulnerability that allows unauthenticated remote code execution (RCE) that could give attacks control of the systems the software is running in.
The vulnerability – which has been dubbed Log4Shell – has been given a severity score of 10/10, the highest score possible. The Apache Foundation released an emergency patch as part of the 2.15.0 release of Log4j 2 that fixes the RCE vulnerability.
The Broad Reach of Log4j
The software is used by both enterprise applications as well as cloud-based services, and the vulnerability could have wide effects on enterprises, according to security professionals. Log4Shell reportedly also can impact the default configurations of several Apache frameworks, such as Apache Struts2, Apache Druid and Apache Flink.
“Given how ubiquitous this library is, the impact of the exploit (full server control), and how easy it is to exploit, the impact of this vulnerability is quite severe,” Free Wortley, CEO of cybersecurity firm LunaSec, and Chris Thompson, a developer at the company, wrote in a blog post. “Anybody using Apache Struts is likely vulnerable. We’ve seen similar vulnerabilities exploited before in breaches like the 2017 Equifax data breach.”
They wrote that many services are vulnerable to the exploit, including cloud services like Apple iCloud and Steam and applications like Minecraft. Open-source projects like Paper, the server used by Minecraft, have begun patching Log4j 2. Servers used by such name companies as Twitter, Cloudflare, Apple and Tencent also have been found to be vulnerable to Log4Shell.
A number of other open-source projects, such as ElasticSearch, Redis and Elastic Logstash, reportedly also use Log4j.
The Log4Shell vulnerability comes months after open-source security was a central topic of discussion at this year’s Black Hat conference.
Enterprises Urged to Apply the Patch
The RCE vulnerability – which initially was discovered by the Alibaba Cloud Security Team late last month – affects Log4j versions 2.0-beta9 to 2.14.1. According to LunaSec, Log4Shell can be exploited on vulnerable servers when data from the user is sent to the server using any protocol. The server then logs the data in the request that contains the malicious payload and the Log4j vulnerability is triggered by the payload.
The server makes a request to attacker.com through the Java Naming and Directory Interface (JNDI) and 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 then allows an attacker to execute arbitrary code.
Tweet Fuels Rush by Good Guys, Bad Actors
The flurry of activity around Log4Shell was kicked off on Thursday when it was disclosed on Twitter in a tweet that included a proof-of-concept (PoC) code.
“This is a worst-case scenario,” Casey Ellis, founder and CTO at crowdsourced security vendor Bugcrowd, told eSecurity Planet, noting the “combination of Log4j’s ubiquitous use in software and platforms, the many, many paths available to exploit the vulnerability, the dependencies that will make patching this vulnerability without breaking other things difficult, and the fact that the exploit itself fits into a tweet. It’s going to be a long weekend for a lot of people.”
Attackers Seeking Servers
A number of organizations, including computer emergency response teams (CERTs) for Deutsche Telekom and New Zealand, said they have seen attackers seeking servers that are vulnerable to Log4Shell. Deutsche Telekom officials said in a tweet that they “are observing attacks in our honeypot infrastructure coming from the TOR network.”
In a similar tweet, security firm GreyNoise reported that it “is currently seeing 2 unique IP’s scanning the internet for the new Apache Log4j RCE vulnerability…”
“RCE vulnerabilities on webservers represent the most serious of issues,” John Bambenek, principal threat hunter at cybersecurity company Netenrich, told eSecurity Planet. “With PoC code already released, we will likely start seeing exploitation by the end of today. As webapps running this kind of setup typically would process sensitive information, the mitigations in question should be applied immediately, which includes updating Java.”
He added that web application firewalls should also be updated to include an appropriate rule to block such attacks.
Researchers with cybersecurity company Randori’s Attack Team wrote in a blog post that they developed a working exploit and successfully leveraged the Log4j vulnerability in customer environments as part of the vendor’s offensive security platform.
“The vulnerability is reachable via a multitude of application-specific methods,” they wrote. “Effectively, any scenario that allows a remote connection to supply arbitrary data that is written to log files by an application utilizing the Log4j library is susceptible to exploitation. This vulnerability is highly likely to be exploited in the wild and is likely to impact thousands of organizations. This vulnerability poses a significant real-world risk to affected systems.”
More Vulnerable Products Expected
That said, assessing long-term effects of Log4Shell isn’t easy, the Randori researchers wrote. However, the immediate impacts will be felt.
“The Log4j 2 library is very frequently used in enterprise Java software,” they wrote. “Due to this deployment methodology, the impact is difficult to quantify. Similarly to other high-profile vulnerabilities such as Heartbleed and Shellshock, we believe there will be an increasing number of vulnerable products discovered in the weeks to come. Due to the ease of exploitation and the breadth of applicability, we suspect ransomware actors to begin leveraging this vulnerability immediately.”
Dor Dali, director of information security at cybersecurity vendor Vulcan Cyber, told eSecurity Planet that he would put it in the top-three worst vulnerabilities that have arisen this year.
“It wouldn’t be a stretch to say that every enterprise organization uses Java, and Log4j is one of the most-popular logging frameworks for Java,” Dali said. “Connecting the dots, the impact of this vulnerability has the reach and potential to be substantial if mitigation efforts aren’t taken right away. The Log4j vulnerability is relatively easy to exploit and we’ve already seen verifiable reports that bad actors are actively running campaigns against some of the largest companies in the world.”