You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Social OAuth authorization code (rtCode) transmitted as URL query parameter #375
The social authentication flow passes the OAuth authorization code as a query string parameter (?rtCode=...) rather than in the POST body. Query parameters appear in:
Server access logs
Browser history
Referrer headers sent to third-party scripts on the destination page
Proxies and CDN logs
This can expose short-lived but sensitive OAuth codes before they are exchanged for tokens.
Location
apps/public-api/src/routes/userAuth.js and the corresponding controller in userAuth.controller.js.
Impact
An attacker who obtains the rtCode before it is consumed can exchange it for an access token and hijack the account.
OAuth 2.0 best-practice (RFC 6749 Section 10.5) explicitly warns against transmitting authorization codes in URLs.
Suggested Fix
Accept rtCode exclusively via a POST request body:
// Instead of GET /auth/social?rtCode=...// Use POST /auth/social with body { rtCode: '...' }router.post('/social',asyncHandler(socialAuthController));
Activity
anshul23102 commentedon Jul 31, 2026
@geturbackend Could you please assign this issue to me? I'd like to work on it under GSSoC '26.
/assign
/claim