CVE-2026-75554: Explicit organization scopes survive token refresh after membership ends
Insufficient Session Expiration vulnerability in the OAuth token refresh grant in hexpm hexpm allows a user removed from an organization to keep reading its private packages.
expandrepositoriesscope/3 in lib/hexpm/permissions.ex only rewrites the literal repositories scope, so an explicitly granted repository:<org> or docs:<org> scope passes through it untouched. The refresh grant re-derives a new token from the stored grantedscopes, which holds that expanded form, so every refresh reproduces the organization scope without revisiting membership. Because both CDN edges authorize repository access from the token claim without querying the database, an account removed from an organization retains read access for as long as it keeps refreshing, bounded by the 30 day refresh token lifetime rather than the 30 minute access token lifetime.
This issue affects hex.pm: from 2025-10-10 before 2026-08-24.
Affected Software
Event History
Frequently Asked Questions
Which users can retain access after removal from an organization?
Users who were granted explicit repository:<org> or docs:<org> scopes for the organization and possess a refresh token can retain read access to that organization's private packages after their membership ends.
What does an attacker or former member need to continue accessing private packages?
They need a refresh token whose stored granted scopes include an explicitly granted organization repository or documentation scope. Refreshing the token reproduces the organization scope without rechecking membership.
How long can access persist after organization removal?
Access can persist for up to the 30-day refresh token lifetime if the user continues refreshing tokens, rather than ending with the 30-minute access-token lifetime.
How can an organization determine whether it may be affected?
Review whether removed members had OAuth tokens with explicit repository:<org> or docs:<org> scopes and could still hold valid refresh tokens. The issue affects hex.pm from 2025-10-10 until before 2026-08-24.