Vulnérabilité dans github.com/oauth2-proxy/oauth2-proxy/v7 (CVE-2021-21411)
Résumé
Vulnérabilité dans github.com/oauth2-proxy/oauth2-proxy/v7 (CVE-2021-21411). Risque d'opérations non autorisées ou de divulgation. Atténuation : mise à jour vers 7.1.0 ou plus.
Description d'origine
La description telle que publiée par la source (souvent en anglais).
OAuth2-Proxy is an open source reverse proxy that provides authentication with Google, Github or other providers. The --gitlab-group flag for group-based authorization in the GitLab provider stopped working in the v7.0.0 release. Regardless of the flag settings, authorization wasn't restricted. Additionally, any authenticated users had whichever groups were set in --gitlab-group added to the new X-Forwarded-Groups header to the upstream application. While adding GitLab project based authorization support in #630, a bug was introduced where the user session's groups field was populated with the --gitlab-group config entries instead of pulling the individual user's group membership from the GitLab Userinfo endpoint. When the session groups where compared against the allowed groups for authorization, they matched improperly (since both lists were populated with the same data) so authorization was allowed. This impacts GitLab Provider users who relies on group membership for authorization restrictions. Any authenticated users in your GitLab environment can access your applications regardless of --gitlab-group membership restrictions. This is patched in v7.1.0. There is no workaround for the Group membership bug. But --gitlab-project can be set to use Project membership as the authorization checks instead of groups; it is not broken.
Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV
Résumé généré automatiquement
Assemblé par SecPulse à partir des données sources (CVSS, CWE, versions affectées) à l'aide de modèles, sans IA. Vérifiez la description d'origine et les références ci-dessous.
Une vulnérabilité référencée CVE-2021-21411 a été découverte dans github.com/oauth2-proxy/oauth2-proxy/v7.
Risque d'opérations non autorisées ou de divulgation.
Action : mettez à jour github.com/oauth2-proxy/oauth2-proxy/v7 vers 7.1.0 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « github.com/oauth2-proxy/oauth2-proxy/v7 CVE-2021-21411 » sur le site de l'éditeur.
CVE-2021-21411 (github.com/oauth2-proxy/oauth2-proxy/v7) — CWE-285
Vecteur d'attaque : distant (réseau) / sans interaction utilisateur
Correctif : 7.1.0 — appliquer immédiatement
Plan : 1) Audit SBOM, 2) Mise à jour staging→prod, 3) Surveillance WAF/proxy sur les endpoints affectés, 4) Recherche d'IOC dans les logs.
Réfs : voir GHSA / avis éditeur / version corrigée liés sur cette page.
Une vulnérabilité (CWE-285) affecte github.com/oauth2-proxy/oauth2-proxy/v7.
Consultez l'avis de l'éditeur pour les versions affectées de github.com/oauth2-proxy/oauth2-proxy/v7.
Gravité : ?. Risque d'opérations non autorisées ou de divulgation.
Mettre à jour vers 7.1.0.
En attendant le correctif : désactivez la fonctionnalité concernée, appliquez des règles WAF, ou restreignez l'accès par ACL réseau.
Recherchez dans les logs des requêtes correspondant aux IOC connus de cette CVE. Auditez les SBOM/dépendances.
Actions de réponse
Étapes concrètes et exemples de commandes que les équipes SOC/SRE doivent exécuter dans l'ordre
-
1Identify exposure identify
grep -r 'github.com/oauth2-proxy/oauth2-proxy/v7' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
github.com/oauth2-proxy/oauth2-proxy/v7を grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade github.com/oauth2-proxy/oauth2-proxy/v7 to 7.1.0ステージング環境で 7.1.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Paquets affectés
Références
- advisory github.com
- advisory nvd.nist.gov
- advisory github.com
- advisory pkg.go.dev
- advisory docs.gitlab.com
- package github.com
- patch github.com
- web docs.gitlab.com