CVE-2026-47386: NocoDB: OAuth Authorization Code Race Condition
Summary Two concurrent token-exchange requests using the same OAuth authorization code could each mint a distinct valid (accesstoken, refreshtoken) pair, breaking the single-use guarantee that PKCE relies on. Details The token-exchange flow read isused and called markAsUsed as an unconditional update at the end of the path.
Published Jun 5, 2026 · Updated Jul 20, 2026
Affected packages
nocodb
- Ecosystem
- npm
- Affected
- <= 2026.05.0
- Fixed in
- 2026.05.1
- Check
npm ls nocodb
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
Two concurrent token-exchange requests using the same OAuth authorization code could each mint a distinct valid (access_token, refresh_token) pair, breaking the single-use guarantee that PKCE relies on.
Details
The token-exchange flow read is_used and called markAsUsed as an unconditional update at the end of the path. A new OAuthAuthorizationCode.claimByCode method now performs an atomic compare-and-swap (WHERE code = ? AND is_used = false) and is called immediately before OAuthToken.insert, after redirect-URI, PKCE, and client authentication have all succeeded. Only the first concurrent caller's UPDATE wins; the rest see invalid_grant: Authorization code has already been used.
Impact
An attacker who has observed an authorization code and the corresponding PKCE verifier (for example through a malicious OAuth-aware client or by racing a real exchange) could obtain a long-lived refresh token in addition to the legitimate one.
Credit
This issue was reported by @eddieran.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-53927
NocoDB: Server-Side Request Forgery via Spreadsheet Fetch URL
medium5.1No fixJun 17, 2026CVE-2026-53928
NocoDB: Refresh Tokens Persist Through Password Recovery
medium6.3No fixJun 17, 2026CVE-2026-53929
NocoDB: Stored Cross-Site Scripting via Secure Attachment
medium5.1No fixJun 17, 2026CVE-2026-53930
NocoDB: Server-Side Request Forgery via Base Migration URL
medium5.1No fixJun 17, 2026CVE-2026-53931
NocoDB: Server-Side Request Forgery via Spreadsheet Import Endpoint
medium6.9No fixJun 17, 2026CVE-2026-47279
NocoDB: Hidden LTAR Column Exposure in Public Shared-View Relation Endpoints
medium6.9Jun 5, 2026
