Descrizione
A flaw was found in Foreman’s Api::V2::PersonalAccessTokensController, where Foreman::Controller::UserAware#find_user resolves the target account using User.find(params[:user_id]) without applying the required parent-user authorization check. An attacker with the create_personal_access_tokens permission can therefore invoke POST /api/v2/users/:user_id/personal_access_tokens with another user’s ID and create a Personal Access Token on their behalf. The resulting plaintext token is returned in the API response, while PersonalAccessToken#check_permissions_after_save only validates create_personal_access_tokens on the token and does not enforce edit_users authorization on the target user. The attacker can then use the forged token to authenticate as the victim, potentially resulting in complete account takeover, including administrator accounts.
Come correggere
Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 8.8, EPSS 0.4% (percentile 38).
Versioni da aggiornare
Il record non riporta ancora i prodotti e le versioni corrette (analisi NVD in corso). Consultare l'advisory del vendor nei riferimenti.
Mitigazioni temporanee
Da applicare solo se non è possibile aggiornare subito:
- Restringere l'accesso al componente, applicare il principio del minimo privilegio e controllare i log per operazioni non autorizzate.
Verifica
- Individuare tutti gli asset con il prodotto interessato (inventario, scanner di vulnerabilità, CMDB).
- Confrontare la versione installata con quelle indicate sopra.
- Applicare l'aggiornamento in un ambiente di test, poi in produzione; riavviare i servizi se richiesto.
- Ripetere la scansione per confermare la correzione.
Riferimenti
- Riferimentohttps://access.redhat.com/errata/RHSA-2026:100120
- Riferimentohttps://access.redhat.com/errata/RHSA-2026:99949
- Riferimentohttps://access.redhat.com/errata/RHSA-2026:99950
- Riferimentohttps://access.redhat.com/errata/RHSA-2026:99952
- Riferimentohttps://access.redhat.com/security/cve/CVE-2026-86322
- Riferimentohttps://bugzilla.redhat.com/show_bug.cgi?id=2529289