CVE-2025-53106:
Graylog vulnerable to privilege escalation through API tokens
8.8
CVSS ScoreBasic Information
Technical Details
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
org.graylog2:graylog2-server | maven | >= 6.2.0, < 6.2.4 | 6.2.4 |
org.graylog2:graylog2-server | maven | >= 6.3.0-alpha.1, < 6.3.0-rc.2 | 6.3.0-rc.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability is a classic case of improper authorization. The system correctly authenticated the user and checked if they had the permission USERS_TOKENCREATE
, but it failed to properly authorize the action of creating a token for another user. The flaw was in the generateNewToken
function within UsersResource.java
. The permission check isPermitted(USERS_TOKENCREATE, currentUser.getName())
only validated that the user making the request could create tokens in general, based on their own identity. It did not validate if they were allowed to create a token for the user specified by userId
.
An attacker with a low-privilege account could exploit this by making a request to the /api/users/{user_id}/tokens/{token_name}
endpoint, where {user_id}
is the ID of a privileged account like 'admin'. Because the permission check was flawed, the system would proceed to generate a new API token for the administrator and return it to the attacker. The attacker could then use this token to perform actions with administrative privileges.
The patch corrects this by changing the permission check to isPermitted(USERS_TOKENCREATE, futureOwner.getName())
. This ensures that the permission check is scoped to the user for whom the token is being created (futureOwner
), effectively preventing a user from creating a token for another user unless they have been explicitly granted that permission (e.g., users:tokencreate:admin
).
Vulnerable functions
org.graylog2.rest.resources.users.UsersResource.generateNewToken
graylog2-server/src/main/java/org/graylog2/rest/resources/users/UsersResource.java