Vulnérabilité dans @acastellon/auth (CVE-2026-58399)
Résumé
Vulnérabilité dans @acastellon/auth (CVE-2026-58399). Risque d'opérations non autorisées ou de divulgation. Exploitable via GET /protected. Atténuation : mise à jour vers 2.3.0 ou plus.
Description d'origine
La description telle que publiée par la source (souvent en anglais).
@acastellon/auth v2.2.0 appears to allow an unauthenticated authentication bypass in validateToken() through spoofable auth-user and Host request headers.
The validateToken middleware contains a service-to-service bypass for auth-user: service-brother when req.get('host').startsWith(getHostName()). Both values involved in the check can be influenced by an unauthenticated HTTP client: auth-user is a request header, and Host is also client-controlled. As a result, a remote unauthenticated attacker can send a request with crafted headers and bypass token validation before the normal legacy/JWT/OIDC validation logic runs.
Impact:
An attacker may be able to access routes protected by validateToken() without a valid token. In deployments where downstream services trust auth-user or is-* headers, this may also lead to privilege escalation.
Affected package:
@acastellon/auth v2.2.0
Affected code:
auth.js, validateToken()
The issue is related to the service-brother bypass and getHostName() check.
Example request:
GET /protected HTTP/1.1
Host:
auth-user: service-brother
is-admin: true
Expected behavior:
The request should require a valid authentication token.
Actual behavior:
The middleware calls next() before token validation.
Fix implemented in v2.3.0+:
Removed the spoofable bypass.
Always sanitize incoming auth-user and is-* headers.
Added mTLS client certificate based service auth (with optional TRUSTED_MTLS_SERVICES allowlist).
Updated consumers (rest, graphql, d…
Source: GitHub Security Advisories (Global) NVD GitHub Advisory
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-2026-58399 a été découverte dans @acastellon/auth.
Des attaquants peuvent cibler un point d'entrée spécifique comme GET /protected à distance pour détourner le produit.
Risque d'opérations non autorisées ou de divulgation.
Action : mettez à jour @acastellon/auth vers 2.3.0 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « @acastellon/auth CVE-2026-58399 » sur le site de l'éditeur.
CVE-2026-58399 (@acastellon/auth) — CWE-290
Surface d'attaque : GET /protected
Correctif : 2.3.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-290) affecte @acastellon/auth. Les attaquants atteignent le code vulnérable via GET /protected.
Consultez l'avis de l'éditeur pour les versions affectées de @acastellon/auth. Surface d'attaque : GET /protected.
Gravité : ?. Risque d'opérations non autorisées ou de divulgation.
Mettre à jour vers 2.3.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 webserver/proxy/WAF des requêtes anormales vers GET /protected (en-têtes d'auth malformés, méta-caractères SQL). Auditez les fichiers de dépendances pour trouver @acastellon/auth.
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 '@acastellon/auth' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
@acastellon/authを grep し、稼働しているサービス・バージョンを把握する。 -
2Hunt for indicators of compromise detect
grep 'GET /protected' /var/log/nginx/access.log | grep -E '(unusual_payload|sqli_pattern)'アクセスログで
GET /protectedへの異常なリクエスト (不正な認証ヘッダ・SQLメタ文字)を過去 30〜90日分捜索。WAF/SIEM があれば該当パスのアラート発火履歴を確認。 -
3Apply patch patch
Upgrade @acastellon/auth to 2.3.0ステージング環境で 2.3.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスと、Step 2 で見つけた異常検知の続報チェックを含めること。
-
4Post-deployment verification verify
Replay attack against GET /protected on staging to confirm patch closes the vectorパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番では Step 2 と同じログクエリでアラート再発が無いか継続監視。
Paquets affectés
Références
- package github.com
- web github.com
- web github.com
- web npmjs.com
- web github.com