• News
  • Security
  • Products
  • About Seqrite
Blogs on Information Technology, Network & Cybersecurity | Seqrite Blog
  • News
  • Security
  • Products
  • About Seqrite
Home  /  Uncategorized • Vulnerability  /  CVE-2022-26134: Actively Exploited Atlassian OGNL Injection Zero-Day Vulnerability
CVE-2022-26134: Actively Exploited Atlassian OGNL Injection Zero-Day Vulnerability
05 July 2022

CVE-2022-26134: Actively Exploited Atlassian OGNL Injection Zero-Day Vulnerability

Written by Rahul Pawar
Rahul Pawar
Uncategorized, Vulnerability
Estimated reading time: 4 minutes

On June 2, 2022, CVE-2022-26134 “Confluence,” a zero-day remote code execution vulnerability, was discovered in all versions of the Confluence Server and Data Center. The attack was detected to be of high severity (CVSS:9.0/10.0) according to a security advisory provided by Atlassian.

The critical severity vulnerability has received the ID of CVE-2022-26134, and a threat actor can exploit this vulnerability to perform unauthenticated remote code execution using OGNL injection. Last year also confluence faced a critical remote code execution vulnerability (CVE-2021-26084) in Confluence Server and Confluence Data Center. The vulnerability arises from an OGNL injection flaw and allows unauthenticated attackers to execute arbitrary code on Confluence Server or Data Center instances.

What is an OGNL injection?

An open-source Expression Language (EL) for Java objects is called Object-Graph Navigation Language. In particular, OGNL allows the evaluation of EL expressions in Apache Struts, the popular framework for creating Java-based web applications in business settings. The most severe flaws in Apache Struts are related to OGNL expression injection attacks, which let invalidated expressions be evaluated against the value stack, giving an attacker the ability to change system variables or run arbitrary code.

Technical Analysis:

CVE-2022-26134 is a remote code execution vulnerability resulting in code execution in the context of the Confluence server. A threat actor looking to utilize this vulnerability will place the malicious payload in the URI of an HTTP request. Any HTTP method appears to work, whether valid (GET, POST, PUT, etc.) or invalid.

The simplest form of a URL containing a malicious payload will be:

%24%7B%40java.lang.Runtime%40getRuntime%28%29.exec%28%22touch%20/tmp/r7%22%29%7D/

Above, the exploit is URL-encoded. When decoding the URL, we receive the following exploitation:

${@java.lang.Runtime@getRuntime().exec(“touch /tmp/r7”)}, which will create a new file in the /tmp/ directory.

In the captured GET request traffic below, you can see the threat actor is performing an OGNL injection to take advantage of the vulnerability present in the confluence.

Fig: 1

Threat actors looking to use this vulnerability but also need the compromised server’s response can use the X-Cmd-Response header.

For example, it is executing the id command and receiving the output in the X-Cmd-Response header of the response by the vulnerable server.

 

Fig:2

Root Cause:

The root cause for the vulnerability is in the findValue(str) method within the translateVariables function. The server calls the translateVariables method as soon as it receives the HTTP request.

When the TextParseUtil method is called with the request URI given as the expression parameter in the method, after compiling the string and stripping it from the pattern “\\\\$\\\\{([^}]*)\\\\}” the remained code is transferred to the findValue method, which in this scenario executes the code.

Fig: 3

As mentioned, the main problem is the call for translateVariables with the URI as an argument. The fix Atlassian has provided includes various changes.

The first is adding a safe expression check for the input expression at the findValue method.

The second one is setting the finalNamespace and finalActionName variables without using the translateVariables method.

The last change is to remove OgnValueStack, given that it isn’t used if the translateVariables functions are not called.

Before Patch:

Fig: 4

After Patch:

Fig: 5

Atlassian also included SafeExpressionUtil.class in the xworks jar. To analyze expressions when findValue is called, SafeExpressionUtil.class has been put into OgnlValueStack.class to perform filtering of unsafe expressions. For instance:

Fig: 6

How Quick Heal protects its users

Quick Heal provides extensive protection against the exploitation of this kind of vulnerability. HIPS module in QH identifies and blocks malicious activities like malicious network traffic, malicious files, and also malicious IPs to protect our customers.

Detection Highlights

File Based

· Exp.CVE-2022-26134.46649

· Exp.CVE-2022-26134.46650.GC

· JS.Backdoor.38151

· ELF.Trojan.45098.GC

· Script.Trojan.44757

Network-Based

· HTTP/CVE-2022-26134!RP.46663

· HTTP/CVE-2022-26134!RP.46665

· HTTP/CVE-2022-26134!RP.46686

· HTTP/CVE-2022-26134!RP.46687

IOC

Hashs

· 4c02c3a150de6b70d6fca584c29888202cc1deef

· 80b327ec19c7d14cc10511060ed3a4abffc821af

· 75259ee2db52d038efea5f939f68f122

· ea18fb65d92e1f0671f23372bacf60e7

· 6078c8a0c32f4e634f2952e3ebac2430

· f8df4dd46f02dc86d37d46cf4793e036

· df096b253754a66cded9ad81b8ea27f5

· 3eb5db35032f5147761f7f8eb8e661c2

· de7a94deccdb9a274ed3c06b28993c0c

IPS

· 154.146.34.145

· 154.16.105.147

· 156.146.34.46

· 156.146.34.52

· 156.146.34.9

· 156.146.56.136

· 198.147.22.148

· 198.147.22.148

· 221.178.126.244

· 45.43.19.91

· 59.163.248.170

· 64.64.228.239

· 66.115.182.102

· 66.115.182.111

· 67.149.61.16

· 98.32.230.38

 Previous PostCVE-2022-30190: Zero-day vulnerability “Follina” in MSDT expl...
Next Post  Securing Cybersecurity for Enterprises and SMBs
Rahul Pawar

About Rahul Pawar

Rahul is a Security Researcher at Quick Heal Security Labs. He finds his interests in malware analysis, reverse engineering, and reading about the emerging...

Articles by Rahul Pawar »

Related Posts

  • WordPress Site Security Alert: Bookly Plugin Vulnerability Discovered and Patched

    March 29, 2023
  • Expiro: Old Virus Resurfaces to Cast New Challenge

    February 27, 2023
  • blog news

    Your Data and Devices are safe with SEQRITE

    November 19, 2022

No Comments

Leave a Reply.Your email address will not be published.
Cancel reply

CAPTCHA Image
Refresh Image

Popular Posts
  • 5 Security measures you should take to protect your organization’s network 5 Security measures you should take to protect your organization’s network August 11, 2017
  • Benefits of having Intrusion Prevention/Detection System in your enterprise Benefits of having Intrusion Prevention/Detection System in your enterprise February 15, 2018
  • Uncovering LockBit Black’s Attack Chain and Anti-forensic activity Uncovering LockBit Black’s Attack Chain and Anti-forensic activity February 1, 2023
Featured Authors
  • Seqrite
    Seqrite

    Follow us for the latest updates and insights related to security for...

    Read more..
  • Sanjay Katkar
    Sanjay Katkar

    Sanjay Katkar is the Joint Managing Director and Chief Technology Officer of...

    Read more..
  • Jayesh Kulkarni
    Jayesh Kulkarni

    Jayesh is working as a Security Researcher for a couple of years. He likes to...

    Read more..
Stay Updated!
Topics
apt (11) Cyber-attack (32) cyber-attacks (56) cyberattack (11) cyberattacks (12) Cybersecurity (301) cyber security (26) Cyber threat (29) cyber threats (44) Data (11) data breach (50) data breaches (27) data loss (28) data loss prevention (33) data protection (21) data security (13) DLP (49) Encryption (16) endpoint security (103) Enterprise security (15) EPS (10) Exploit (12) firewall (11) hackers (11) IoT (10) malware (64) malware attack (23) malware attacks (12) MDM (25) Microsoft (14) Network security (18) Patch Management (12) phishing (18) Ransomware (60) ransomware attack (29) ransomware attacks (30) ransomware protection (12) security (10) Seqrite (26) Seqrite Encryption (27) Seqrite EPS (33) Seqrite Services (16) UTM (34) Vulnerability (15) windows (11)
Products
  • Seqrite MSSP Portal
  • HawkkScan
  • HawkkProtect
  • HawkkHunt XDR
  • HawkkEye
  • HawkkEye Endpoint Security Cloud
  • HawkkEye mSuite
  • HawkkEye Workspace
  • Endpoint Security (EPS)
  • Unified Threat Management
  • Antivirus for Server
  • Antivirus for Linux
Resources
  • White Papers
  • Datasheets
  • Threat Reports
  • Manuals
  • Case Studies
About Us
  • Company Overview
  • Leadership
  • Why choose SEQRITE?
  • Awards & Certifications
  • Newsroom
Archives
  • By Date
  • By Category

© 2022 Quick Heal Technologies Ltd. Cookie Policies Privacy Policies

Our website uses cookies. Cookies enable us to provide the best experience possible and help us understand how visitors use our website.
By browsing this website, you agree to our cookie policy.