Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
analyze-Exploit-CVE-2023-22518-Confluence — CVE-2023-22518 exploit analysis for Atlassian Confluence Server covering setup, JAR diffing, root cause, and unauthorized restore to regain admin access. | Kitploit
Tools/GitHubGitHub/d3ckkno0b/analyze-exploit-cve-2023-22518-confluence
Vulnerability AnalysisCode AnalysisExploitationReverse EngineeringWeb Application ExploitationDebuggersLearning & Education
GitHubd3ckkno0b/analyze-exploit-cve-2023-22518-confluence

analyze-Exploit-CVE-2023-22518-Confluence

CVE-2023-22518 exploit analysis for Atlassian Confluence Server covering setup, JAR diffing, root cause, and unauthorized restore to regain admin access.

View Repository
151 year agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

Exploit-CVE-2023-22518

CVE-2023-22518 in Confluence

CVE-2023-22518 : This vulnerability is described as an "improper authorization vulnerability in Confluence's database and server". The flaw affects On-premises versions of Atlassian products.

SETUP

Set up the environment. Use the vulnerable version 8.0.4. Download URL: https://product-downloads.atlassian.com/software/confluence/downloads/atlassian-confluence-8.0.4-x64.exe

image

Select Trial Installation, then click the link to get a free trial key. Then set up the cluster: choose non-cluster

image

Then go to database setup -> Select MySQL

image

Follow the instructions:

Download the MySQL driver Drop the .jar file in /home/lily/atlassian/confluence/confluence/WEB-INF/lib Restart Confluence and continue the setup process.

image

Configure the database, create user and password table

root@kitploit:~
CREATE DATABASE securedb CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
CREATE USER 'admin123'@'localhost' IDENTIFIED BY 'supersecure';
GRANT ALL PRIVILEGES ON securedb.* TO 'admin123'@'localhost';
GRANT SUPER ON *.* TO 'your_username'@'your_host';
FLUSH PRIVILEGES;

Then edit /etc/mysql/my.cnf. Add the following lines:

root@kitploit:~
transaction-isolation = READ-COMMITTED
log_bin_trust_function_creators = 1

image

Then restart MySQL and Confluence. Then go to the setup page at localhost:8090 and fill in using the created database

image

Check connection success, click Next. Then Sign up.

image

DEBUG

** Diff the jar files of the two versions in IntelliJ **

  • Specifically, here I diff versions 8.0.4 and 7.19.16. As described, diff the confluence.jar file of the two versions against each other

image

  • The difference between the patched and unpatched versions is @WebSudoRequired and @SystemAdminOnly. WebSudoRequired is a feature that enhances the security of administrator sessions. When trying to access admin, the system will require re-entering the password even though you are already logged into the system. It adds an additional authentication step to ensure administrative access.

SystemAdminOnly : Is a feature that restricts administrative functions to administrator accounts only. This helps ensure that only authorized accounts can perform critical operations that affect the system.

Set a breakpoint at validate() in RestoreAction.class

image

The function saves the uploaded file using getRestoreFileFromUpload

image

GetExportDescriptor is used to unzip and read the contents of the zip file

image

image

However, after debugging, the root cause of the vulnerability has not yet been found.

The cause described in the CVE is an authorization vulnerability. This leads us to direct our attention to research on Java language vulnerabilities in the developer authorization process.

Shift attention to the struts.xml file. This file contains information about actions and routing based on namespaces as well as interceptors.

image

image

image

We can see that the /json namespace enhances the functionality of the /admin namespace. Therefore, routes created for the /admin namespace can also be accessed through the /json namespace.

In the context of the /json namespace, the request routing process involves passing through a chain of interceptors. One of these interceptors, called WebSudoInterceptor, performs checks based on the request URI.

Specifically, WebSudoInterceptor performs the following checks:

If the request path is /authenticate.action, it will be skipped. If the request path is /admin, it will check whether the WebSudoNotRequired attribute is empty.

If a request is sent to '/json', then the request to '/json/action' will be forwarded to '/setup/action' and 'admin/action'. In this CVE, the vulnerable path is '/json/setup-restore.action?synchronous=true'

Capture the request with Burp Suite, GET /json/setup-restore.action. However, a "Method Not Allowed response" was received. Try POST /json/setup-restore.action?synchronous=true and get a 200 response.

image

image

Upload the file xmlexport-200123123001.zip

image

Send and receive the response

image

Now we can log in with the account admin :admin

image

And the result is as follows

image

Download Tool