LibreChat 0.7.8 before 0.8.9 contains a race condition vulnerability in checkBalance that allows authenticated users to obtain multiple auto-refill credits by sending concurrent requests. Attackers can send simultaneous chat requests that each pass the unlocked lastRefill check, receiving repeated refillAmount credits and bypassing configured token credit limits.
References
- github.com/LibreChat-AI/LibreChat/blob/v0.8.8-…heckBalance.ts#L113-L140
- github.com/LibreChat-AI/LibreChat/blob/v0.8.8-…transaction.ts#L242-L246
- github.com/LibreChat-AI/LibreChat/commit/0fea0…6d364d6964b10f
- github.com/LibreChat-AI/LibreChat/commit/696bc…ea4cddd43b176c
- github.com/LibreChat-AI/LibreChat/releases/tag/v0.8.9
- github.com/LibreChat-AI/LibreChat/security/adv…32pj-j526-963j
- vulncheck.com/advisories/librechat-0.7.8-befor…ce-auto-refill