GHSA-c45c-39f6-6gw9: Rancher generated tokens not revoked after modifications made to authentication provider
Оценка Noroxi
Приоритет: Наблюдать (оценка срочности 35/100)
- В отслеживаемых источниках (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) нет публичного эксплойта или записей об эксплуатации.
- Может быть вызвана любым, у кого есть доступ через интернет. Достаточно учётной записи с низкими привилегиями. Действия пользователя не требуются. Особые условия не требуются; воспроизводится стабильно.
- Исправленная версия: github.com/rancher/rancher (Go) 2.5.17, 2.6.10, 2.7.1.
Пока низкий приоритет. Обновитесь до github.com/rancher/rancher (Go) 2.5.17, 2.6.10, 2.7.1 или новее.
Формируется автоматически по данным записи: CVSS (NVD и CNA), CISA KEV и SSVC, FIRST EPSS, источники эксплойтов, исправленные версии. Как мы считаем
Первоисточники: OSV
### Impact This issue affects Rancher versions from 2.5.0 up to and including 2.5.16, from 2.6.0 up to and including 2.6.9 and 2.7.0. It only affects Rancher setups that have an external [authentication provider](https://ranchermanager.docs.rancher.com/pages-for-subheaders/authentication-config) configured or had one configured in the past. It was discovered that when an external authentication provider is configured in Rancher and then disabled, the Rancher generated [tokens](https://ranchermanager.docs.rancher.com/reference-guides/about-the-api/api-tokens) associated with users who had access granted through the now disabled auth provider are not revoked. This allows users to retain access to Rancher and `kubectl` access to clusters managed by Rancher, according to their previous configured permissions, even after they are supposed to have lost it due to the auth provider been disabled. The problem also occurs if the auth provider is configured (and is still enabled) to use the [access level scopes](https://ranchermanager.docs.rancher.com/pages-for-subheaders/authentication-config) `allow members of clusters and projects, plus authorized users & groups` and `restrict access to only the authorized users & groups`. In this case, removing users and groups from the authorized lists will not revoke the access tokens and they will remain valid. An example scenario is: 1. OpenLDAP, MS Active Directory (AD) or any other external [authentication provider](https://ranchermanager.docs.rancher.com/pages-for-subheaders/authentication-config) is configured as an auth provider. 2. A user (`cluster-owner`) is granted `cluster-owner` permissions on a downstream cluster (`test-cluster`). 3. `cluster-owner` logs in using their external auth provider username and password. 4. `cluster-owner` generates a `kubeconfig` token for `test-cluster`. 5. The configured external auth provider is disabled. In this scenario, the `kubeconfig` generated in step 4 will still be valid after step 5, and `test-cluster` can still be accessed using the `kubeconfig` token. By default, tokens for authenticated session have their `ttl` (time to live) set to `960` minutes, so they will expire after `16` hours. `kubeconfig` tokens are configured to never expire, and their `ttl` is set to `0`. These configurations can be changed in the Rancher's settings (`Configuration > Global Settings > Settings`) with the [parameters](https://ranchermanager.docs.rancher.com/reference-guides/about-the-api/api-tokens) `auth-user-session-ttl-minutes` and `kubeconfig-default-token-ttl-minutes`, respectively. ### Workarounds If you cannot update to a patched Rancher version, the recommended workaround is to review and remove tokens associated with auth providers manually. The tokens can be reviewed by executing `kubectl get tokens` in Rancher's `local` cluster. Each found token must be manually reviewed to check if it belongs to a user from a disabled auth provider or a user who's access was previously removed from the auth provider (when the auth provider is still enabled and is or was configured to use access level scopes, as mentioned above). The identified tokens can be removed with `kubectl delete tokens <token_name>`. It is important to mention that this workaround must be done every time an auth provider is disabled in case you cannot update to a patched version. ### Patches Patched versions include releases 2.5.17, 2.6.10, 2.7.1 and later versions. After updating to a patched version, it is highly recommended to review the existing tokens and remove tokens related to disabled auth providers as described above in the workaround section. ### For more information If you have any questions or comments about this advisory: * Reach out to [SUSE Rancher Security team](https://github.com/rancher/rancher/security/policy) for security related inquiries. * Open an issue in [Rancher](https://github.com/rancher/rancher/issues/new/choose) repository. * Verify our [support matrix](https://www.suse.com/suse-rancher/support-matrix/all-supported-versions/) and [product support lifecycle](https://www.suse.com/lifecycle/).
- Опубликовано
- 25 янв. 2023 г.
- Обновлено
- 25 янв. 2023 г.
- EPSS
- —
- CWE
- CWE-287
Инструменты для отчёта
Оценка срочности
35
Пока низкий приоритет.
- CVSS
- 35 / 40 · 8.8 / 10
- CISA KEV
- 0 / 30 · Нет в списке
- EPSS
- 0 / 30 · —
Узнайте, когда запись изменится
- Нет в KEV: эксплуатация в реальных атаках не зафиксирована
- Публичного эксплойта нет
- Исправление выпущено
Если что-то из этого изменится, сообщим в ежедневной сводке.
Затронута ли ваша версия? ПроверьтеАнализ Noroxi
Что это значит для вашей инфраструктуры?
Оценка выше формируется автоматически по данным записи и не знает вашей среды. Наша команда проверит на ваших системах, действительно ли уязвимость эксплуатируема и какой меры достаточно.
Мы используем этот продукт, нужна помощьЗатронутые системы
Затронута ли ваша версия?
Выберите продукт и введите свою версию. Она сравнивается с диапазонами этой записи прямо в браузере и никуда не отправляется.
| Вендор | Продукт | CPE |
|---|---|---|
| Go | github.com/rancher/rancher | pkg:golang/github.com/rancher/rancher |
Затронутые пакеты
Данные OSV и GitHub Advisory: экосистема, пакет и диапазон. Сопоставление SBOM использует эту таблицу.
| Экосистема | Пакет | Затронутый диапазон | Исправление |
|---|---|---|---|
| Go | github.com/rancher/rancher | с 2.5.0 · до 2.5.17 | 2.5.17 |
| Go | github.com/rancher/rancher | с 2.6.0 · до 2.6.10 | 2.6.10 |
| Go | github.com/rancher/rancher | с 2.7.0 · до 2.7.1 | 2.7.1 |
Тот же продукт
Go: все записиДругие записи с наивысшей оценкой для того же основного продукта.
- GO-2026-4590Rancher's restricted PodSecurityPolicy does not prevent containers from running as a privileged user in github.com/rancher/rancher0Наблюдать
- GHSA-hwm2-4ph6-w6m5Rancher's restricted PodSecurityPolicy does not prevent containers from running as a privileged user0Наблюдать
- GHSA-wm2r-rp98-8pmhExposure of SSH credentials in Rancher/Fleet0Наблюдать
Исправление
На какую версию обновиться
Версии с исправлением по данным вендора, реестров пакетов и Microsoft. Перед обновлением сверьтесь с бюллетенем вендора.
| Продукт / пакет | Исправленная версия | Источник |
|---|---|---|
| Go:github.com/rancher/rancher | 2.5.17 | Реестр пакетов (OSV) |
| Go:github.com/rancher/rancher | 2.6.10 | Реестр пакетов (OSV) |
| Go:github.com/rancher/rancher | 2.7.1 | Реестр пакетов (OSV) |
Статус эксплойта
Публичный эксплойт неизвестен
Публичный эксплойт пока не обнаружен. Это не значит, что вы в безопасности, лишь что порог чуть выше.
Контекст для исследователя
Для пентестеров и исследователей: профиль атаки, расхождение оценок, хронология, коммиты исправлений, авторы, кандидаты в варианты и цепочки, охват bug bounty. Всё выводится из имеющихся данных; без кода эксплойтов.
Хронология
От публикации до сегодня: proof of concept, модуль Metasploit, CISA KEV и запись об исправлении. Даты — как сообщают источники.
Кроме публикации датированных событий нет.
В записи нет: истории EPSS · ссылки на коммит или PR с исправлением · указания авторов находки · кандидатов в варианты и цепочки · публичной программы вознаграждений.
Технические детали
Условия атаки
- Может быть вызвана любым, у кого есть доступ через интернет.
- Достаточно учётной записи с низкими привилегиями.
- Действия пользователя не требуются.
- Особые условия не требуются; воспроизводится стабильно.
В случае успеха
- Конфиденциальность
- высокое · данные могут быть прочитаны
- Целостность
- высокое · данные или конфигурация могут быть изменены
- Доступность
- высокое · работа сервиса может быть нарушена
- Вектор атаки
- Сеть
- Сложность атаки
- Низкая
- Требуемые привилегии
- Низкие
- Взаимодействие с пользователем
- Не требуется
- Область действия
- Не изменяется
- Влияние на конфиденциальность
- Высокое
- Влияние на целостность
- Высокое
- Влияние на доступность
- Высокое
Класс уязвимости (CWE)
CWE-287 · Improper AuthenticationВектор CVSS
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
osv
Первопричина
Аутентификация добавляется к каждому маршруту по отдельности, а не обеспечивается централизованно. Если маршрут, добавленный позже, обходит общий промежуточный обработчик, проверка сессии для него не выполняется вовсе.
Ошибка в коде
Весь класс CWE-287Показательный пример этого класса уязвимостей. Это не исходный код вендора; показан ошибочный шаблон и его исправление.
Уязвимый код
app.use("/admin", requireSession, adminRouter);
// Добавленный позже маршрут обходит обработчик
app.post("/admin-api/config", updateConfig);Исправленный код
const admin = express.Router();
admin.use(requireSession, requireRole("admin"));
admin.post("/config", updateConfig);
app.use("/admin", admin);Контекст атаки
Шаблоны атак MITRE CAPEC и техники ATT&CK для этого класса уязвимости (CWE). Отправная точка для правил обнаружения и threat hunting.
Шаблоны атак (CAPEC)
- Authentication AbuseCAPEC-114Medium
- Authentication BypassCAPEC-115Medium
- Identity SpoofingCAPEC-151вероятность: Medium · Medium
- Fake the Source of DataCAPEC-194Medium
- Exploiting Trust in ClientCAPEC-22вероятность: High · High
- Utilizing REST's Trust in the System Resource to Obtain Sensitive DataCAPEC-57вероятность: Medium · Very High
- Session HijackingCAPEC-593вероятность: High · Very High
- Token ImpersonationCAPEC-633Medium
Техники ATT&CK
Журнал изменений (1)
- Исправление✗ → ✓
Для отслеживаемых записей эти изменения приходят и как уведомления. →
Источники
Показать все источники (ещё 1)Свернуть
Рекомендации вендоров и официальные записи. Ссылки на эксплойты/PoC намеренно исключены.