CVE-2025-69871
Race Condition in MedusaJS Promotion Module Enables Unlimited Redemptions
Publication date: 2026-02-11
Last updated on: 2026-02-12
Assigner: MITRE
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| medusajs | medusa | to 2.12.2 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-362 | The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability is a race condition in MedusaJS Medusa v2.12.2 and earlier, specifically in the registerUsage() function of the promotion module.
The function performs a non-atomic read-check-update operation when enforcing promotion usage limits, meaning it reads the current usage count, checks it against the limit, and updates it without proper synchronization.
Because of this, unauthenticated remote attackers can send multiple concurrent checkout requests that bypass the usage limits, allowing unlimited redemptions of limited-use promotional codes.
How can this vulnerability impact me? :
The vulnerability allows attackers to bypass promotion usage limits by exploiting a race condition, resulting in unlimited redemptions of promotional codes that are supposed to be limited.
This can lead to significant financial loss for businesses using MedusaJS as attackers can redeem promotions more times than intended without authentication.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
[{'type': 'paragraph', 'content': 'This vulnerability involves a race condition in the promotion usage limit enforcement in MedusaJS Medusa v2.12.2 and earlier. Detection would involve monitoring for concurrent checkout requests using the same promotional code that exceed the usage limit.'}, {'type': 'paragraph', 'content': 'Since the issue arises from non-atomic read-check-update operations on the usage counter, you can detect it by observing multiple simultaneous requests redeeming the same limited-use promotion code.'}, {'type': 'paragraph', 'content': 'Suggested commands or approaches include:'}, {'type': 'list_item', 'content': 'Monitor web server logs or application logs for multiple concurrent checkout requests with the same promotion code.'}, {'type': 'list_item', 'content': 'Use network traffic analysis tools (e.g., tcpdump, Wireshark) to capture and analyze concurrent HTTP POST requests to the checkout endpoint containing the promotion code.'}, {'type': 'list_item', 'content': "Query the Medusa database promotion usage table to check if the 'used' count exceeds the 'limit' for any promotion."}, {'type': 'list_item', 'content': 'Example command to check logs for concurrent usage of a promotion code (replace PROMO_CODE with actual code):'}, {'type': 'list_item', 'content': "grep 'PROMO_CODE' /path/to/medusa/logs/access.log | grep 'checkout' | less"}, {'type': 'list_item', 'content': 'Example SQL query to detect usage count exceeding limits:'}, {'type': 'list_item', 'content': 'SELECT id, used, limit FROM promotion WHERE used > limit;'}] [2]
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation steps include:
- Upgrade MedusaJS Medusa to a version that includes the fix for this race condition vulnerability once it is released.
- Temporarily disable or remove usage limits on promotions to prevent exploitation of the race condition.
- Implement external rate limiting or concurrency controls on checkout requests to prevent multiple simultaneous redemptions of the same promotion code.
- Monitor and audit promotion usage closely to detect any suspicious or excessive redemptions.
- Consider applying database-level locking or transactional controls around promotion usage updates if possible as a temporary workaround.