# CVE-2020-26223: Authorization bypass in Spree

> Attackers can bypass authorization on the API v2 Order Status endpoint by using an empty token, potentially accessing order data.

- **Severity:** High 7.7 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 13 Nov 2020
- **Updated:** 4 Aug 2024
- **Also known as:** GHSA-m2jr-hmc3-qmpr

## What is CVE-2020-26223?

CVE-2020-26223 is a high-severity authentication bypass vulnerability in spree, published on 13 Nov 2020. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

Spree is a complete open source e-commerce solution built with Ruby on Rails. In Spree from version 3.7 and before versions 3.7.13, 4.0.5, and 4.1.12, there is an authorization bypass vulnerability. The perpetrator could query the API v2 Order Status endpoint with an empty string passed as an Order token. This is patched in versions 3.7.11, 4.0.4, or 4.1.11 depending on your used Spree version. Users of Spree < 3.7 are not affected.

Weakness: CWE-863 (Incorrect Authorization)

## Which versions are affected by CVE-2020-26223?

6 open source packages ship an affected version, including spree_api. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `spree_api` | RubyGems | From 3.7.0 | 3.7.13 |
| `spree_api` | RubyGems | From 3.7.0 | 3.7.13 |
| `spree_api` | RubyGems | From 4.0.0 | 4.0.5 |
| `spree_api` | RubyGems | From 4.0.0 | 4.0.5 |
| `spree_api` | RubyGems | From 4.1.0 | 4.1.12 |
| `spree_api` | RubyGems | From 4.1.0 | 4.1.12 |

Products: Spreecommerce Spree.

## How do I fix CVE-2020-26223?

Upgrade spree_api to a fixed version for your release line: 3.7.13, 4.0.5 or 4.1.12.

## Is CVE-2020-26223 being exploited?

There is no known exploitation of CVE-2020-26223 in the wild and no public exploit code.

## Other vulnerabilities in spree

- [CVE-2011-10019](https://insights.sbomify.com/CVE-2011-10019/): Spreecommerce < 0.60.2 Search Parameter RCE (critical 10.0)
- [CVE-2011-10026](https://insights.sbomify.com/CVE-2011-10026/): Spreecommerce < 0.50.x API RCE (critical 9.3)
- [CVE-2026-25757](https://insights.sbomify.com/CVE-2026-25757/): Unauthenticated Spree Commerce users can view completed guest orders by Order ID (high 7.7)
- [CVE-2026-25758](https://insights.sbomify.com/CVE-2026-25758/): Spree allows unauthenticated users can access all guest addresses (high 7.7)
- [CVE-2026-22589](https://insights.sbomify.com/CVE-2026-22589/): Spree API has Unauthenticated IDOR - Guest Address (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-26223 and fix it if it is affected.

What it is: CVE-2020-26223 is a high-severity authentication bypass vulnerability in spree, published on 13 Nov 2020. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2020-26223 in the wild and no public exploit code.

Affected packages and fixed versions:
- spree_api (RubyGems): affected from 3.7.0; fixed in 3.7.13
- spree_api (RubyGems): affected from 3.7.0; fixed in 3.7.13
- spree_api (RubyGems): affected from 4.0.0; fixed in 4.0.5
- spree_api (RubyGems): affected from 4.0.0; fixed in 4.0.5
- spree_api (RubyGems): affected from 4.1.0; fixed in 4.1.12
- spree_api (RubyGems): affected from 4.1.0; fixed in 4.1.12

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2020-26223/ (Markdown: https://insights.sbomify.com/CVE-2020-26223/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2020-26223
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2020-26223
- OSV: https://osv.dev/vulnerability/CVE-2020-26223

---
From sbomify Insights: https://insights.sbomify.com/CVE-2020-26223/
Summaries are generated and may contain mistakes; the official description above is the record.
