CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-25759
8.7

Command Pwned: Stored XSS in Statamic's Command Palette

Alon Barad
Alon Barad
Software Engineer

Feb 11, 2026·6 min read·5 visits

PoC Available

Executive Summary (TL;DR)

Low-privileged editors can name an article with a malicious XSS payload. When a Super Admin opens the Command Palette (Cmd+K) and searches for it, the script runs. This grants the attacker full admin access.

A critical Stored Cross-Site Scripting (XSS) vulnerability in Statamic CMS allows authenticated content editors to inject malicious JavaScript into the global Command Palette. When a Super Admin searches for content, the payload executes, leading to potential account takeover and Remote Code Execution (RCE).

The Hook: Command+K for 'Kill'

Statamic is the darling of the Laravel world. It's a flat-file CMS that runs on Git, meaning your content is version-controlled, your database is nonexistent, and your developer experience is usually buttery smooth. One of the sleekest features in the Statamic Control Panel is the Command Palette. You know the drill: hit Cmd+K (or Ctrl+K), type a few letters, and navigate anywhere instantly. It’s the productivity hack we all love.

But here’s the thing about centralized search tools: they aggregate data from everywhere. In a CMS, that means they pull in page titles, user names, collection entries, and navigation labels. If the mechanism that displays those search results gets a little too trusting with the data it retrieves, you have a problem.

In CVE-2026-25759, that trust was misplaced. The Command Palette didn't just display titles; it executed them. This turns a helpful navigation tool into a loaded gun pointing directly at your Super Admin's session cookies. It’s a classic case of "Cool Feature, Bro, Did You Secure It?"

The Flaw: Fuzzy Logic, Fuzzy Security

The vulnerability lies in how the Command Palette handles "highlighting." When you search for "Blog", a good UI highlights the word "Blog" in the results so you know why it matched. To do this, Statamic uses a library called fuzzysort.

fuzzysort is a great library. It takes a string, finds the match, and wraps the matching characters in HTML tags, usually <span> or <b>. For example, searching "vuln" in "vulnerability" might produce <span>vuln</span>erability.

Here is the catch-22: To display that highlighting in the browser, the application must render the result as raw HTML. If it rendered it as plain text, you’d see the literal <span> tags on screen, which looks broken.

Statamic's developers fell into the trap. They took the raw content title from the database and fed it into fuzzysort. fuzzysort added the highlight tags, and Vue.js rendered the whole string as HTML. They forgot one crucial step: Escaping the original string first.

Because the input wasn't sanitized before highlighting, if an attacker names a blog post <h1>Hello</h1>, the Command Palette renders a giant header. If they name it <script>..., well, you know what happens next.

The Code: The Smoking Gun

Let's look at the crime scene in resources/js/components/command-palette/CommandPalette.vue. The vulnerability existed in a mapping function that processed search results before display.

The Vulnerable Code:

// In Statamic < 6.2.3
results.map(result => {
    return {
        // ...
        // result[0] is the raw, unsanitized title from the content file.
        // It gets passed directly to highlight().
        html: result[0].highlight(`<span class="${highlightClasses}">`, '</span>'),
        // ...
    };
});

Use your hacker eyes. result[0] comes from user input. highlight adds some HTML classes. The result is assigned to a property called html. Later in the template, this is likely rendered via v-html.

The Fix (Commit 6ed4f65):

The fix is simple but critical. The developer introduced a sanitization step using escapeHtml before asking fuzzysort to do its magic.

// In Statamic >= 6.2.3
import { escapeHtml } from '@/bootstrap/globals.js';
 
function highlightResult(text) {
    // STEP 1: Neutralize the threat.
    const safeText = escapeHtml(text);
    
    // STEP 2: Now it's safe to perform highlighting.
    const result = fuzzysort.single(query.value, safeText);
    
    // STEP 3: Return the safe string with added highlight tags.
    return result?.highlight(`<span class="${classes}">`, '</span>') || safeText;
}

By escaping the HTML first, an input like <script> becomes &lt;script&gt;. fuzzysort can still highlight the word "script", but the browser will render it as text, not code.

The Exploit: From Editor to God Mode

To exploit this, we don't need fancy tools. We just need a lower-privileged account, like an Editor who can create blog posts but can't change system settings or add users.

Step 1: The Setup

Log in as the Editor. Create a new Entry (page, article, whatever). For the Title, enter the following payload:

User Policy <img src=x onerror="fetch('/cp/users', {method:'POST', body: new FormData().append('email', 'hacker@evil.com')...})">

(Note: In a real attack, you'd likely use a cleaner payload that loads an external JS file to keep the title looking somewhat normal, or obfuscate it.)

Step 2: The Trap

The payload is now stored in the content files (or database). It sits there, waiting. It's a landmine.

Step 3: The Trigger

The Super Admin logs in. Maybe they are looking for that "User Policy" page to edit it. They hit Cmd+K. As they type "User", the Command Palette fetches our malicious entry.

Because the palette renders results as you type, the Admin doesn't even need to click the link. The moment the result appears in the dropdown list, the <img> tag is rendered, the onerror event fires, and the JavaScript executes in the context of the Super Admin.

Step 4: The Prestige

The script silently sends a POST request to the Statamic API creating a new Super Admin account named "SystemUpdater" with the password "Password123!". The victim notices nothing, perhaps a slight UI flicker. You now own the CMS.

The Impact: Why Should You Panic?

In the world of CMS security, XSS in the Control Panel is often treated as a "Severity: High" issue, but in reality, it is usually "Severity: Critical/Game Over."

Statamic allows Super Admins to edit Antlers templates (the view layer) and often manage files directly. If I can execute JavaScript as a Super Admin, I can:

  1. Modify Templates: Inject PHP (if enabled) or malicious JS into the public-facing website, attacking all your site visitors (Watering Hole Attack).
  2. Exfiltrate Data: Read the .env file via the file manager to get AWS keys, database credentials, and API secrets.
  3. RCE: In many configurations, an Admin can install addons or edit code files that lead to direct Remote Code Execution on the server.

This isn't just a pop-up alert box; it's a full compromise of the web server.

The Fix: Patch It or Lose It

The remediation is straightforward: Update to Statamic v6.2.3 immediately.

If you cannot update (perhaps you are locked on a legacy version for compatibility reasons), you are in a tough spot. You could theoretically attempt to patch the CommandPalette.vue file manually and recompile the assets, but that breaks the upgrade path and checksums.

Defensive Advice for Developers:

  1. Never trust v-html (or dangerouslySetInnerHTML): If you must use it, ensure the data is sanitized immediately before use. Do not assume data from the database is safe.
  2. Sanitize on Output, Not Input: While it's tempting to strip tags when saving the blog post title, that breaks legitimate use cases (maybe I want a title about <script> tags). The correct place to fix this is strictly in the display logic of the Command Palette.
  3. Content Security Policy (CSP): A strict CSP could mitigate the impact here. If you disallow unsafe-inline scripts, the attacker's payload might fail to execute. However, getting a CMS control panel to run with a strict CSP is often a project in itself.

Official Patches

StatamicStatamic v6.2.3 Release Notes

Fix Analysis (1)

Technical Appendix

CVSS Score
8.7/ 10
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N

Affected Systems

Statamic CMS 6.0.0Statamic CMS 6.0.xStatamic CMS 6.1.xStatamic CMS 6.2.0Statamic CMS 6.2.1Statamic CMS 6.2.2

Affected Versions Detail

Product
Affected Versions
Fixed Version
Statamic CMS
Statamic
>= 6.0.0, < 6.2.36.2.3
AttributeDetail
CVE IDCVE-2026-25759
CVSS v3.18.7 (High)
CWECWE-79 (Cross-site Scripting)
Attack VectorNetwork (Stored)
Privileges RequiredLow (Editor)
User InteractionRequired (Search Trigger)
Patch StatusFixed in v6.2.3

MITRE ATT&CK Mapping

T1059.007Command and Scripting Interpreter: JavaScript
Execution
T1548Abuse Elevation Control Mechanism
Privilege Escalation
T1189Drive-by Compromise
Initial Access
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.

Known Exploits & Detection

Manual AnalysisPoC derived from patch diff: Inject script into entry title, trigger via Command Palette search.

Vulnerability Timeline

Patch Authored & Released (v6.2.3)
2026-02-04
CVE Published
2026-02-11

References & Sources

  • [1]GHSA-ff9r-ww9c-43x8
  • [2]NVD Record

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.