Skip to content

Commit f118d91

Browse files
authored
GHSA SYNC: 2 brand new spree advisories (#987)
1 parent c547b76 commit f118d91

File tree

2 files changed

+175
-0
lines changed

2 files changed

+175
-0
lines changed
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
---
2+
gem: spree_api
3+
ghsa: 87fh-rc96-6fr6
4+
url: https://github.com/spree/spree/security/advisories/GHSA-87fh-rc96-6fr6
5+
title: Unauthenticated Spree Commerce users can access all guest addresses
6+
date: 2026-02-05
7+
description: |
8+
### Summary
9+
10+
A critical IDOR vulnerability exists in Spree Commerce's guest
11+
checkout flow that allows any guest user to bind arbitrary guest
12+
addresses to their order by manipulating address ID parameters.
13+
This enables unauthorized access to other guests' personally
14+
identifiable information (PII) including names, addresses and
15+
phone numbers. The vulnerability bypasses existing ownership
16+
validation checks and affects all guest checkout transactions.
17+
18+
### Impact
19+
20+
This issue may lead to disclosure of PII of guest users (including
21+
names, addresses and phone numbers).
22+
23+
### Unauthenticated users can access all guest addresses (`GHSL-2026-027`)
24+
25+
The vulnerability stems from incomplete authorization validation
26+
in Spree's checkout address assignment logic. While nested address
27+
attributes (`bill_address_attributes[id]` and
28+
`ship_address_attributes[id]`) are properly validated through
29+
`validate_address_ownership`, plain ID parameters (`bill_address_id`
30+
and `ship_address_id`) bypass this check entirely. Since Spree's
31+
address IDs are sequential numbers, an attacker might get all
32+
guest addresses by simply enumerating over them.
33+
34+
### Affected Code Components
35+
36+
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))
37+
- Allows `bill_address_id` and `ship_address_id` as permitted
38+
parameters without validation
39+
40+
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))
41+
- Applies permitted parameters directly to the Order model
42+
via `update_from_params`
43+
44+
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))
45+
- `validate_address_ownership` only validates nested attributes structure
46+
- Does NOT validate plain `bill_address_id`/`ship_address_id` fields
47+
48+
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))
49+
* [`bill_address_id=` setter](https://github.com/spree/spree/blob/1341623f2ae92685cdbe232885bf5808fc8f9ca8/core/app/models/spree/order/address_book.rb#L16-L24)
50+
* [`ship_address_id=` setter](https://github.com/spree/spree/blob/1341623f2ae92685cdbe232885bf5808fc8f9ca8/core/app/models/spree/order/address_book.rb#L31-L39)
51+
52+
Both setters check that: `address.user_id == order.user_id`. For
53+
guest orders: nil == nil → TRUE ✓ (bypass!)
54+
55+
#### Impact
56+
57+
This issue may lead to disclosure of PII of guest users (including
58+
names, addresses and phone numbers).
59+
60+
#### CWEs
61+
62+
- CWE-639: Authorization Bypass Through User-Controlled Key
63+
- CWE-284: Improper Access Control
64+
65+
### Credit
66+
67+
This issue was discovered with the [GitHub Security Lab Taskflow
68+
Agent](https://github.com/GitHubSecurityLab/seclab-taskflow-agent)
69+
and manually verified by GHSL team members
70+
[@p- (Peter Stöckli)](https://github.com/p-) and
71+
[@m-y-mo (Man Yue Mo)](https://github.com/m-y-mo).
72+
73+
### Disclosure Policy
74+
75+
This report is subject to a 90-day disclosure deadline, as
76+
described in more detail in our [coordinated disclosure policy](https://securitylab.github.com/advisories#policy).
77+
patched_versions:
78+
- "~> 4.10.3"
79+
- "~> 5.0.8"
80+
- "~> 5.1.10"
81+
- "~> 5.2.7"
82+
- ">= 5.3.2"
83+
related:
84+
url:
85+
- https://github.com/spree/spree/security/advisories/GHSA-87fh-rc96-6fr6
86+
- https://github.com/spree/spree/commit/15619618e43b367617ec8d2d4aafc5e54fa7b734
87+
- https://github.com/spree/spree/commit/29282d1565ba4f7bc2bbc47d550e2c0c6d0ae59f
88+
- https://github.com/spree/spree/commit/6650f96356faa0d16c05bcb516f1ffd5641741b8
89+
- https://github.com/spree/spree/commit/902d301ac83fd2047db1b9a3a99545162860f748
90+
- https://github.com/spree/spree/commit/ff7cfcfcfe0c40c60d03317e1d0ee361c6a6b054
91+
- https://github.com/spree/spree/blob/1341623f2ae92685cdbe232885bf5808fc8f9ca8/core/app/models/spree/order/address_book.rb#L16-L38
92+
- https://github.com/spree/spree/blob/1341623f2ae92685cdbe232885bf5808fc8f9ca8/core/app/models/spree/order/checkout.rb#L241-L254
93+
- https://github.com/spree/spree/blob/1341623f2ae92685cdbe232885bf5808fc8f9ca8/core/app/services/spree/checkout/update.rb#L33-L48
94+
- https://github.com/spree/spree/blob/1341623f2ae92685cdbe232885bf5808fc8f9ca8/core/lib/spree/permitted_attributes.rb#L92-L96
95+
- https://github.com/advisories/GHSA-87fh-rc96-6fr6
96+
notes: |
97+
- CVE-2026-25758 in GHSA Advisory.
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
gem: spree_storefront
3+
ghsa: p6pv-q7rc-g4h9
4+
url: https://github.com/spree/spree/security/advisories/GHSA-p6pv-q7rc-g4h9
5+
title: Unauthenticated Spree Commerce users can view completed
6+
guest orders by Order ID
7+
date: 2026-02-05
8+
description: |
9+
### Unauthenticated users can view completed guest orders by Order ID (`GHSL-2026-029`)
10+
11+
The `OrdersController#show` action permits viewing completed
12+
guest orders by order number alone, without requiring the
13+
associated order token.
14+
15+
Order lookup without enforcing token requirement in [`OrdersController#show`](https://github.com/spree/spree/blob/1341623f2ae92685cdbe232885bf5808fc8f9ca8/storefront/app/controllers/spree/orders_controller.rb#L14):
16+
17+
```ruby
18+
@order = complete_order_finder.new(number: params[:id],
19+
token: params[:token], store: current_store).execute.first
20+
```
21+
22+
Authorization bypass for guest orders in [`authorize_access`](https://github.com/spree/spree/blob/1341623f2ae92685cdbe232885bf5808fc8f9ca8/storefront/app/controllers/spree/orders_controller.rb#L51C1-L55C8):
23+
```ruby
24+
def authorize_access
25+
return true if @order.user_id.nil?
26+
27+
@order.user == try_spree_current_user
28+
end
29+
```
30+
31+
If the attacker is in possession of a leaked Order ID, they might
32+
look it up directly via this API.
33+
Alternatively, brute forcing all or parts of the possible
34+
Order IDs might be feasible for an attacker. (The Order IDs
35+
themselves are [securely generated](https://github.com/spree/spree/blob/a878eb4a782ce0445d218ea86fb12075b0e3d7cc/core/lib/spree/core/number_generator.rb#L45),
36+
but with relatively low entropy: by default an order ID has a
37+
length of 9 and a base of 10, that would require an attacker to
38+
perform 1 billion requests to gather all guest orders. (At an
39+
assumed constant rate of 100 requests per second it would take 115 days.)
40+
41+
#### Impact
42+
43+
This issue may lead to disclosure of PII of guest users
44+
(including names, addresses and phone numbers).
45+
46+
#### CWEs
47+
48+
- CWE-639: Authorization Bypass Through User-Controlled Key
49+
50+
### Credit
51+
52+
This issue was discovered with the [GitHub Security Lab Taskflow Agent](https://github.com/GitHubSecurityLab/seclab-taskflow-agent)
53+
and manually verified by GHSL team members
54+
[@p- (Peter Stöckli)](https://github.com/p-) and
55+
[@m-y-mo (Man Yue Mo)](https://github.com/m-y-mo).
56+
57+
### Disclosure Policy
58+
59+
This report is subject to a 90-day disclosure deadline, as
60+
described in more detail in our [coordinated disclosure policy](https://securitylab.github.com/advisories#policy).
61+
patched_versions:
62+
- "~> 5.0.8"
63+
- "~> 5.1.10"
64+
- "~> 5.2.7"
65+
- ">= 5.3.2"
66+
related:
67+
url:
68+
- https://github.com/spree/spree/security/advisories/GHSA-p6pv-q7rc-g4h9
69+
- https://github.com/spree/spree/commit/3e00be64c128ef4bd4b99731f0c3ab469509cfab
70+
- https://github.com/spree/spree/commit/6b32ed7d474aa55fa441990e6aa39740152aa1be
71+
- https://github.com/spree/spree/commit/6f6b8a7a28a8bff24a6e20eab04b4bbbdf39384d
72+
- https://github.com/spree/spree/commit/ea4a5db590ca753dbc986f2a4e818d9e0edfb1ad
73+
- https://github.com/spree/spree/blob/1341623f2ae92685cdbe232885bf5808fc8f9ca8/storefront/app/controllers/spree/orders_controller.rb#L14
74+
- https://github.com/spree/spree/blob/1341623f2ae92685cdbe232885bf5808fc8f9ca8/storefront/app/controllers/spree/orders_controller.rb#L51C1-L55C8
75+
- https://github.com/spree/spree/blob/a878eb4a782ce0445d218ea86fb12075b0e3d7cc/core/lib/spree/core/number_generator.rb#L45
76+
- https://github.com/advisories/GHSA-p6pv-q7rc-g4h9
77+
notes: |
78+
- CVE-2026-25757 in GHSA advisory.

0 commit comments

Comments
 (0)