/

CVE-2026-25758

Severity:

HIGH RISK

(7.5)

Insecure Direct Object Reference (IDOR) in Spree Guest

CVE-2026-25758

Analyzed

Vulnerability type

Category:

Insecure Direct Object Reference (IDOR)

CWE:

CWE-284, CWE-639

Impact:

Unauthorized Access to Sensitive PII and Account Data Exposure

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A critical insecure direct object reference (IDOR) vulnerability in Spree Commerce's guest checkout flow allows a guest user to associate arbitrary address records with their order by manipulating address ID parameters.

Under these conditions, an attacker can gain unauthorized access to other guests' personally identifiable information (PII), including names, physical addresses, and phone numbers during checkout.

Affected context

This vulnerability occurs in Spree Commerce deployments that support guest checkout and store guest address records server-side.

The issue surfaces when address selection or creation in the checkout flow relies on client-supplied address identifiers without consistently enforcing ownership checks.

Any setup where guest users can proceed through checkout by referencing address IDs in URL or form parameters may be affected, especially when those IDs map to a shared address store for multiple guests.

Exploit preconditions

  • Attack surface: Web-based HTTP requests to the checkout and address-handling endpoints in Spree.
  • Required access: Ability to use the storefront as a guest user (no authenticated account required).
  • Trigger point: Manipulation of address-related parameters (e.g., billing/shipping address IDs) during guest checkout requests.
  • Why exploitation is possible: The server-side logic trusts client-provided address IDs and either skips or incorrectly implements authorization checks that should verify the address belongs to the current guest session, leading to direct access to other guests' address records.

Why this happens

The root cause is a broken access control pattern consistent with CWE-639 (Authorization Bypass Through User-Controlled Key) and CWE-284 (Improper Access Control).

In the vulnerable flow, address resources are identified by predictable or enumerable IDs passed from the client, and the application does not reliably verify that the address belongs to the current guest context before binding it to an order.

This creates an insecure direct object reference where the internal key (address ID) is effectively exposed and trusted, allowing an attacker to reference objects (guest addresses) they do not own by altering parameters in the checkout requests.

Potential impact

  • Exposure of other guests' PII, including names, addresses, and phone numbers.
  • Privacy violations and potential regulatory non-compliance (e.g., GDPR, CCPA) due to unauthorized disclosure of personal data.
  • Facilitation of social engineering or targeted phishing using harvested PII.
  • Potential correlation of separate orders or sessions that use the same address data, reducing user anonymity.

General mitigation guidance

Effective mitigation focuses on enforcing robust, server-side access control for all object lookups tied to user or session context.

Recommended defensive patterns include:

  • Implement strict authorization checks whenever loading address resources, ensuring the address is associated with the current guest session or user account before use.
  • Avoid trusting client-provided IDs alone; derive permissible resources from the authenticated/guest context (e.g., query only addresses linked to the current order or session).
  • Use opaque, non-enumerable identifiers or tokens for customer-facing references, reducing the risk of guessing other users' resource identifiers.
  • Centralize access-control logic for shared models like addresses so that every retrieval path enforces the same ownership validation.
  • Minimize the persistence and sharing of guest address records where possible, and consider scoping them tightly to a single order or ephemeral session.

How teams detect issues like this

Detection generally relies on understanding how resources are loaded and validated in the checkout flow and related controllers.

Potential strategies include:

  • Static analysis rules or code search to identify patterns where address records are loaded directly by ID from request parameters (e.g., find(params[:address_id])) without subsequent ownership checks against the current user or session.
  • Focused code review of checkout and address management controllers/services to verify that every address lookup includes an authorization condition tied to the current guest or order.
  • Security testing and QA practices that include parameter tampering checks in guest checkout paths, attempting to change IDs for addresses, orders, and other user-linked resources.
  • Automated application security testing tools or DAST scanners configured to fuzz object IDs in relevant endpoints and flag responses that return data belonging to other users.

Frequently asked

questions

Yes. Any user who can access the public storefront and use guest checkout can exploit this issue by manipulating the address ID parameters in HTTP requests, without needing an authenticated account.

Only guest-level access to the checkout flow is required. The attacker does not need pre-existing knowledge of a victim's account; they only need to interact with the checkout endpoints and experiment with address ID values.

The most robust fix is to enforce consistent server-side authorization for all address lookups, ensuring that any address bound to an order is derived from or validated against the current session/user context, rather than trusting raw IDs supplied by the client.

Adopt a design where object access is always filtered through the current user or session (e.g., current_order.addresses.find(...)), use non-guessable identifiers where exposure is necessary, and incorporate systematic security reviews and automated tests that target IDOR patterns in all user-facing flows.

Find out what's already
exploitable in your codebase.