CVE-2026-120098: Privilege escalation to administrator through Login As
Improper authorization in the Login As feature (/api/v1/users/loginas) in dotCMS versions before 26.10.28-03 allows an authenticated backend user who holds the Login As role, but is not an administrator, to impersonate an Administrator or CMS Administrator account and gain full administrative access. The same versions placed no upper limit on the lifetime of API tokens a user could issue for themselves. Fixed in 26.10.28-03 and later. Login As to an administrator account now also requires the impersonating user to be an administrator (property LOGINASADMINREQUIRESADMIN, default true), newly issued API tokens are capped by json.web.token.max.allowed.expiration.days (default now 365 days), and an invalid token network restriction is rejected instead of producing an unrestricted token.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 26.10.28-03 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 25.07.10 LTS v28 - Configuration
Set LOGIN_AS_ADMIN_REQUIRES_ADMIN to true so Login As to an administrator account requires the impersonating user to be an administrator
dotCMS Login As LOGIN_AS_ADMIN_REQUIRES_ADMIN = true - Configuration
Set json.web.token.max.allowed.expiration.days to 365 days to cap newly issued API token lifetimes
dotCMS API tokens json.web.token.max.allowed.expiration.days = 365
Event History
Frequently Asked Questions
Which users can exploit the administrator impersonation issue?
An authenticated backend user must hold the Login As role. In affected versions, that role alone allowed a non-administrator to impersonate an Administrator or CMS Administrator account.
Are default deployments affected by the Login As behavior?
Versions before 26.10.28-03 are affected if a non-administrator backend user has the Login As role. In fixed versions, LOGIN_AS_ADMIN_REQUIRES_ADMIN defaults to true, requiring the impersonating user to already be an administrator when targeting an administrator account.
What should be done if an immediate upgrade is not possible?
Remove or tightly restrict the Login As role for non-administrator backend users, particularly where Administrator or CMS Administrator accounts can be selected as impersonation targets. Review API-token issuance as well, because affected versions did not enforce an upper token-lifetime limit.
What configuration changes apply after upgrading?
Ensure LOGIN_AS_ADMIN_REQUIRES_ADMIN remains enabled, as its default is true in the fixed release. Set json.web.token.max.allowed.expiration.days to an appropriate maximum; the new default is 365 days.