Недостаточная уязвимость Session Expiration в AshAuthentication и AshAuthentication Phoenix позволяет полностью аутентифицировать отозванный сеанс. Ресурс, настроенный с отключенными session_identifier:jti и require_token_presence_for_authentication?, сохраняет значение сеанса как <jti>:<subject>. jti существует для того, чтобы при выходе можно было отменить одну сессию. Ни один читатель не советуется с ним: AshAuthentication.Plug.Helpers.authenticate_resource_from_session/4 и AshAuthentication.Phoenix.LiveSession.on_mount/4 делят значение с split_identifier/2, отбрасывают jti и передают голый предмет в AshAuthentication.subject_to_user/3, который перезагружает запись.
Ветвь присутствия токена каждой функции проверяет свой токен, вызывая AshAuthentication.TokenResource.Actions.get_token/3 с jti и целевым пользователем. Поскольку запись отзыва никогда не читается, ни ее отозванное состояние, ни ее истечение не ограничивают сеанс, поэтому сеанс, захваченный до выхода из системы, продолжает работать. Эта проблема затрагивает ash_authentication: от 4.9.1 до 4.15.0 и от 5.0.0-rc.0 до 5.0.0-rc.14; ash_authentication_phoenix: от 2.10.0 до 2.17.4 и от 3.0.0-rc.0 до 3.0.0-rc.11.
Показать оригинальное описание (EN)
Insufficient Session Expiration vulnerability in team-alembic AshAuthentication and AshAuthentication Phoenix allows a revoked session to remain fully authenticated. A resource configured with session_identifier :jti and require_token_presence_for_authentication? disabled stores its session value as <jti>:<subject>. The jti is there so that signing out can revoke that one session. Neither reader consults it: AshAuthentication.Plug.Helpers.authenticate_resource_from_session/4 and AshAuthentication.Phoenix.LiveSession.on_mount/4 both split the value with split_identifier/2, discard the jti and pass the bare subject to AshAuthentication.subject_to_user/3, which reloads the record. The token-presence branch of each function does check its token, calling AshAuthentication.TokenResource.Actions.get_token/3 with the jti and the purpose user. Because the revocation record is never read, neither its revoked state nor its expiry constrains the session, so a session captured before sign-out keeps working. This issue affects ash_authentication: from 4.9.1 before 4.15.0 and from 5.0.0-rc.0 before 5.0.0-rc.14; ash_authentication_phoenix: from 2.10.0 before 2.17.4 and from 3.0.0-rc.0 before 3.0.0-rc.11.
Характеристики атаки
Последствия
Строка CVSS v4.0
Тип уязвимости (CWE)
Уязвимые продукты 4
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Team-Alembic Ash_Authentication
cpe:2.3:a:team-alembic:ash_authentication:*:*:*:*:*:*:*:*
|
4.9.1
|
4.15.0
|
|
Team-Alembic Ash_Authentication
cpe:2.3:a:team-alembic:ash_authentication:*:*:*:*:*:*:*:*
|
5.0.0-rc.0
|
5.0.0-rc.14
|
|
Team-Alembic Ash_Authentication_Phoenix
cpe:2.3:a:team-alembic:ash_authentication_phoenix:*:*:*:*:*:*:*:*
|
2.10.0
|
2.17.4
|
|
Team-Alembic Ash_Authentication_Phoenix
cpe:2.3:a:team-alembic:ash_authentication_phoenix:*:*:*:*:*:*:*:*
|
3.0.0-rc.0
|
3.0.0-rc.11
|