Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAuthenticate with low-privilege account
-
DeliveryAcquire valid unused redemption code
-
ExploitSend multiple concurrent POST requests to redemption endpoint
-
InstallMissing FOR UPDATE lock allows parallel transaction reads
-
C2Each transaction sees code as unredeemed
-
ExecuteMultiple redemptions succeed
-
ImpactAttacker accumulates unauthorized quota credits
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V2 - Validation and Business Logic Business logic errors
|
| Exploitation Conditions | Exploitation requires an authenticated user session (PR:L in CVSS vector - unauthenticated exploitation is not possible). The attacker must possess at least one valid, unused redemption code. High attack complexity (AC:H) is required: the exploit depends on winning a narrow race condition window between concurrent database transactions, which is timing-sensitive and may vary with server load, database response time, and network latency. The vulnerability only materializes in deployments where the redemption code top-up feature is enabled and in use. Limiting factors: the attacker cannot exploit this to gain root access, read data, or impact availability - the ceiling of impact is unauthorized quota credits within the application. The race window narrows further if the database server enforces transaction serialization at its own level (e.g., serializable isolation), though this is not the default for most configurations. |
| Impact | CVSS 4.0 scores this at 1.3, reflecting realistic low severity: AV:N (network-reachable) is offset by AC:H (high complexity due to race condition timing) and PR:L (requires an authenticated session). The only impact is VI:L - limited integrity loss confined to the vulnerable component - with no confidentiality or availability impact confirmed. The exploit maturity modifier E:P (proof-of-concept) is consistent with the publicly referenced GitHub issue, but POC availability does not equal active exploitation; this is not listed in CISA KEV and no evidence of in-the-wild use is present. No EPSS data was provided; given the low CVSS base and high attack complexity, exploitation probability is expected to be negligible. The primary real-world consequence is financial/quota fraud in deployments monetizing API access rather than a system compromise. This is a genuine low-priority finding, not a high-CVSS-but-low-risk inversion - the CVSS score accurately reflects the bounded impact. |
| Exploit ScenarioDerived | An authenticated user with any valid account and a single legitimate redemption code opens multiple HTTP client threads and fires them simultaneously at the redemption endpoint with the same code. Because the database |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 07, 2026
Race condition in songquanpeng one-api's redemption code feature allows authenticated users to redeem a single-use code multiple times by sending concurrent requests before the transaction completes. The root cause is confirmed by PR diff: the codebase uses deprecated GORM v1 syntax (tx.Set("gorm:query_option", "FOR UPDATE")) that does not reliably apply a database row lock in GORM v2, leaving the transaction window unprotected. All versions up to 0.6.11-preview.7 are affected; a fix exists as an unmerged pull request, and publicly available exploit code is referenced in GitHub issue #2397 - no public exploit has been identified at time of analysis.
RemediationAI
Upstream fix available via pull request #2399 (https://github.com/songquanpeng/one-api/pull/2399); this PR awaits acceptance and a released patched version has not been independently confirmed. Operators who require an immediate fix can apply the one-line patch manually: replace tx.Set("gorm:query_option", "FOR UPDATE").Where(...) with tx.Clauses(clause.Locking{Strength: "UPDATE"}).Where(...) in model/redemption.go and rebuild. As a compensating control, applying rate limiting or per-user request deduplication at the API gateway or reverse proxy layer for the redemption endpoint reduces the exploitable concurrency window, though it does not eliminate the race entirely. If the redemption code feature is not actively used, disabling it at the application configuration level eliminates exposure with no functional trade-off. Monitor https://github.com/songquanpeng/one-api/pull/2399 for merge status before upgrading.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in go, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
one-api is a Go application using the GORM ORM for database access. The Redeem function in model/redemption.go wraps redemption code lookups in a database transaction intended to prevent concurrent double-redemptions via pessimistic locking. The flaw is that the deprecated GORM v1 method tx.Set("gorm:query_option", "FOR UPDATE") does not attach a FOR UPDATE row lock in GORM v2, meaning the SELECT query runs without locking the row. The fix in PR #2399 replaces this with tx.Clauses(clause.Locking{Strength: "UPDATE"}), the correct GORM v2 API. CPE cpe:2.3:a:songquanpeng:one-api:*:*:*:*:*:*:*:* covers all versions up to 0.6.11-preview.7. CWE-840 (Business Logic Errors) describes the failure to enforce the invariant that a redemption code is single-use, which is the business contract being violated here. The 'Information Disclosure' tag in the intelligence data appears to be a misclassification - the actual impact is integrity loss (unauthorized quota credits), not disclosure.
Know when One Api gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:H/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P
Primary rating from Vendor (VulDB) · only source for this CVE.
CVSS VectorVendor: VulDB
Lifecycle Timeline
1DescriptionCVE.org
A security flaw has been discovered in songquanpeng one-api up to 0.6.11-preview.7. Affected by this issue is the function Redeem of the file model/redemption.go of the component Redemption Code Top-Up Endpoint. The manipulation results in business logic errors. The attack may be launched remotely. The attack requires a high level of complexity. The exploitation is known to be difficult. The exploit has been released to the public and may be used for attacks. The pull request to fix this issue awaits acceptance.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
EUVD-2026-34996
GHSA-7v3v-cp44-vc8m
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB