Vulnérabilité dans next-auth (CVE-2021-21310)
Résumé
Vulnérabilité dans next-auth (CVE-2021-21310). Risque d'opérations non autorisées ou de divulgation. Atténuation : mise à jour vers 3.3.0 ou plus.
Description d'origine
La description telle que publiée par la source (souvent en anglais).
Impact
Implementations using the Prisma database adapter with the Email provider are impacted.
Implementations using the Prisma database adapter that are not using the Email provider are not impacted.
Implementations using the default database adapter (TypeORM) with the Email provider are not impacted.
Implementations not using a database are not impacted.
Patches
This issue is fixed in 3.3.0 and newer versions.
Workarounds
Those not able to upgrade can alternatively disable the Email provider as a workaround.
Description
The Prisma database adapter was checking the verification token but not the identifier (the email address associated with the token). This made it possible to use a valid token assigned to one user, to sign in as another user when using the Prima adapter in conjunction with the Email provider. The defect is specific to the community-supported Prisma database adapter in versions <3.3.0 and is not present in the default database adapter (TypeORM).
Note: The current community-supported adapter was not developed by Prisma.
The defect was a problem in the implementation of verification function the adapter and is not directly related to Prisma.
The flaw may exist in other third party database adapters that do not check both the identifier and token values.
The design of the database adapter API may be revised in future to help reduce the likelyhood of similar defects.
Timeline
On Monday (2021-02-08) we were notifie…
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-21310 a été découverte dans next-auth.
Risque d'opérations non autorisées ou de divulgation.
Action : mettez à jour next-auth vers 3.3.0 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « next-auth CVE-2021-21310 » sur le site de l'éditeur.
CVE-2021-21310 (next-auth) — CWE-290
Correctif : 3.3.0 — appliquer immédiatement
Contournement : Those not able to upgrade can alternatively disable the Email provider as a workaround.
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-290) affecte next-auth.
Consultez l'avis de l'éditeur pour les versions affectées de next-auth.
Gravité : ?. Risque d'opérations non autorisées ou de divulgation.
Mettre à jour vers 3.3.0.
Contournement : Those not able to upgrade can alternatively disable the Email provider as a workaround.
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 'next-auth' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
next-authを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply temporary workaround mitigate
Those not able to upgrade can alternatively disable the Email provider as a workaround.パッチが適用されるまでの応急処置として、Those not able to upgrade can alternatively disable the Email provider as a workaround. を実施。回避策の副作用 (機能低下) を確認した上で。
-
3Apply patch patch
Upgrade next-auth to 3.3.0ステージング環境で 3.3.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
4Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Paquets affectés
Références
- advisory nvd.nist.gov
- web github.com
- web github.com
- web npmjs.com