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
CockpitCMS-Arbitrary-File-Upload--XSS---Assets — Cockpit CMS 2.7.0 is affected by File Upload - XSS vulnerability that allows attackers to upload a PDF file with a hidden XSS that when executed will launch the XSS pop-up | Kitploit
Tools/GitHubGitHub/sromanhu/cockpitcms-arbitrary-file-upload--xss---assets
Vulnerability AnalysisExploitationWeb Application Exploitation
GitHubsromanhu/cockpitcms-arbitrary-file-upload--xss---assets

CockpitCMS-Arbitrary-File-Upload--XSS---Assets

Cockpit CMS 2.7.0 is affected by File Upload - XSS vulnerability that allows attackers to upload a PDF file with a hidden XSS that when executed will launch the XSS pop-up

View Repository

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share
2 years agoNot yet reviewed

Cockpit CMS 2.7.0 File Upload - XSS

Author: (Sergio)

Description: File upload vulnerability in Cockpit CMS 2.7.0 allows a local attacker to upload a pdf file with hidden XSS.

Attack Vectors: AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:L


POC:

This is the software version.

Version

This is the content of the XSS injected in the PDF file.

Datos maliciosos de XSS parte 2

When logging into the panel, we will go to the "Assets." section off General Menu and click on Upload Asset.

Upload Asset

We upload the injected PDF file:

Upload Asset PDF

In the following evidence we can see that it has been uploaded correctly:

Upload asset complete

To access the Injected PDF we click on the file as shown below:

XSS Edit Asset

And we copy the link of the server path and the ID of the file where it is stored:

XSS Edit Asset y copiar link

We access the copied URL and the XSS pop-up appears

XSS Result

Next, I have developed another PoC where I explain how I created the malicious PDF file and took advantage of the vulnerability to obtain the XSS:

The first thing is to generate the malicious PDF with hidden XSS.

To do this, we create a .js file with the Javascript code that we want to inject for the XSS in the PDF file.

Fichero js

Then we create an empty PDF file (pdf2go) and inject the payload of the .js file using the JS2PDFInjector tool

Injectar payload del fichero js en PDF vacio

We can analyze the content of the injected PDF using the Peepdf tool.

Revisión codigo Javascipt en fichero injectado

There is an object with javascript code in object[3] and we can check it using pdf-parser tool from Peepdf toolkit. Código Javascipt

I have renamed the file to have it more at hand.

Renombrado PDF injectado

We upload the file in Assets:

Subir PDF en Assets

And when we open it we have the XSS of the PDF file stored on the server.

Resultado XSS cockpit


Additional Information:

https://getcockpit.com/

Download Tool