Intel

AIKIDO-2026-10390

spree_core is vulnerable to Race Condition (TOCTOU)

Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Mar 18, 2026
March 18, 2026

54

CVE Score

Medium

Race Condition (TOCTOU)

Are you affected? Scan for Free

TL;DR

The gift card apply service computes the redeemable amount from gift_card.amount_remaining and order.total then creates store credits without holding a lock that covers both the gift card and the order. Under concurrent requests (e.g. the same gift card applied to multiple orders at once), the check and the credit creation can interleave so that the total store credits created exceed the gift card value, allowing overspend. The fix wraps the read and the store credit creation in order.with_lock and acquires gift_card.lock! inside it so the critical section is serialized.

How do I fix this?

Upgrade the spree_core or spree library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Package

Versions

5.0.0 - 5.3.4

Fixed in 5.3.5

Background info

spree_core is vulnerable to Race Condition (TOCTOU) in versions 5.0.0 - 5.3.4.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea