Coder accepts an APIKey beyond the linked OIDC expiry if there is no refresh token
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- —
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from GitHub.
Summary
### Summary If users log in to Coder via OIDC, and the OpenID Identity Provider does not return a refresh token, then Coder may allow their web session to continue beyond the expiration of the token returned by the OpenID Identity Provider. ### Details When a user logs in via OIDC, Coder stores the OIDC token and refresh token (if any) in its datastore and sets an APIKey in the user's cookies. If there is a refresh token, then when the OIDC token is expired and a request is made with the APIKey, we attempt to refresh the OIDC token. If refresh fails, the Coder API request is also failed and the user needs to log in again. However, if there is no refresh token provided, then affected versions of Coder fail to enforce the expiry of the OIDC token, and allow users to make API requests even if it is expired so long as their APIKey stored in cookies has not expired. Coder APIKeys have an expiry and lifetime of 24 hours, but Coder is configured to extend the lifetime of the APIKey by up to 24 hours from the time it is used successfully. So, an APIKey that is used at least once every 24 hours will not expire. (This behavior can be disabled by configuration). ### Impact This could allow a user to access the Coder service beyond the lifetime of the token issued by the OpenID provider, potentially indefinitely, even if they are no loner authorized via OIDC.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | github.com/coder/coder/v2 (Go) | before 2.23.0 | 2.23.0 | Patch available | GHSA-3rw9-wmc8-8948 |
- github.com/coder/coder/v2 (Go) Vendor— Affected before 2.23.0 Fixed in 2.23.0 Patch available GHSA-3rw9-wmc8-8948
Remediation
- Fix · GHSA-3rw9-wmc8-8948 github.com/coder/coder/v2 (Go) Fixed in 2.23.0 Advisory →
Timeline
- 2026-10-03 Threatist record created from GHSA-3rw9-wmc8-8948
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences