Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-64865: CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') in QuantumNous new-api

0
Medium
Published: 08/17/2026 (08/17/2026, 16:36:19 UTC)
Source: CVE Database V5
Vendor/Project: QuantumNous
Product: new-api

Description

### Summary Authenticated users can repeatedly call PUT /api/user/self with language or sidebar_modules while relay requests are consuming quota. The settings path reads a full User snapshot and writes it back through User.Update(), which refreshes Redis with RedisHSetObj and overwrites the Quota field. This can erase concurrent HINCRBY quota deductions and keep cached balance artificially high, allowing calls far beyond the paid quota. ### Impact A low-privileged authenticated user may bypass quota enforcement and cause financial loss to operators. Authentication and pre-consumption use cached quota, while DB/log usage can continue increasing. ### Affected Components - controller/user.go: UpdateSelf language/sidebar_modules branches - model/user.go: User.Update / UpdateWithTx full snapshot update - model/user_cache.go: updateUserCache RedisHSetObj full hash write - model/user.go: GetUserQuota reads Redis cache first ### Root Cause Normal billing uses Redis HINCRBY on user:<id>.Quota, while settings updates use a stale full user snapshot to HSET the entire cache hash, including Quota. These two writers race on the same Redis field. ### Patches This issue is fixed in v1.0.0-rc.16. The fix makes user setting updates field-scoped, prevents stale user snapshots from overwriting accounting fields, and keeps generic user cache refreshes from modifying Quota. Quota cache updates are reserved for atomic quota delta paths or explicit quota synchronization paths. ### Workarounds If upgrading immediately is not possible, operators should temporarily restrict or rate-limit PUT /api/user/self and avoid allowing frequent user setting updates while Redis-backed quota cache is enabled. This is only a mitigation; upgrading is recommended. ### Remediation Upgrade to v1.0.0-rc.16 or later. Deployments with Redis enabled should restart application instances after upgrading so stale in-process code paths are removed.

CVSS v4.0

Score 6.0medium

Attack Vector
Network
Attack Complexity
High
Attack Requirements
Present
Privileges Required
Low
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
High
Vuln. Availability
Low
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N

Affected software

GitHub Actionsmore threats →ai
quantumnous/new-api
pkg:github/quantumnous/new-api
Affected versions
=1.0.0-rc.16

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/17/2026, 16:58:45 UTC

Technical Analysis

QuantumNous new-api versions before 1.0.0-rc.16 have a concurrency issue in the handling of PUT /api/user/self requests that update language or sidebar_modules. The controller calls User.Update, and updateUserCache performs a full Redis HSetObj write to user:.Quota, which can overwrite concurrent HINCRBY quota deductions. This race condition allows an authenticated user to keep their cached quota artificially high, potentially bypassing quota enforcement. The vulnerability is classified as CWE-362 (Concurrent Execution using Shared Resource with Improper Synchronization).

Potential Impact

An authenticated user can exploit this race condition to maintain an artificially high cached quota by overwriting concurrent quota deductions in Redis. This could lead to unauthorized resource usage or billing inconsistencies. There is no indication of remote code execution or privilege escalation beyond quota manipulation. The CVSS 4.0 score is 6.0 (medium severity), reflecting the need for authentication and the complexity of exploitation.

Mitigation Recommendations

This issue is fixed in QuantumNous new-api version 1.0.0-rc.16. Users should upgrade to this version or later to remediate the vulnerability. No other official remediation or temporary fixes are provided. Patch status is not explicitly confirmed beyond the stated fixed version; users should verify with vendor advisories for the latest guidance.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-07-20T18:31:39.292Z
Cvss Version
4.0
State
PUBLISHED
Remediation Level
null

Threat ID: 6a83368ebf8831d53930a3b4

Added to database: 08/17/2026, 16:27:58 UTC

Last enriched: 08/17/2026, 16:58:45 UTC

Last updated: 08/18/2026, 01:30:33 UTC

Views: 7

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses