Traversée de chemin dans @zereight/mcp-gitlab (CVE-2026-61560)
Résumé
Traversée de chemin dans @zereight/mcp-gitlab (CVE-2026-61560). L'exploitation peut entraîner la prise de contrôle totale du système. Exploitable via POST /projects/. Atténuation : mise à jour vers 2.1.27 ou plus.
Description d'origine
La description telle que publiée par la source (souvent en anglais).
Summary
The SSE transport mode (SSE=true) exposes all MCP tools without any authentication. The upload_markdown tool reads arbitrary files from the server's local filesystem via an unsanitized file_path parameter and uploads them to a GitLab project. Combined, any unauthenticated network-reachable attacker can read /proc/self/environ to steal the server's GITLAB_PERSONAL_ACCESS_TOKEN and achieve full GitLab account takeover. This is the default configuration for Docker deployments.
Details
Two issues chain together:
1. No authentication on SSE transport (src/index.ts:7350-7388)
When SSE=true (the intended mode for Docker deployments per docker-compose.yaml), the /sse and /messages endpoints have zero authentication middleware. Any HTTP client that can reach the port can establish a session and invoke all ~100+ tools using the server's configured PAT.
// src/index.ts:7354 — no auth check
app.get("/sse", async (_: Request, res: Response) => {
const serverInstance = createServer();
const transport = new SSEServerTransport("/messages", res);
await serverInstance.connect(transport);
});
Remote Authorization (REMOTE_AUTHORIZATION=true) is explicitly incompatible with SSE mode (src/index.ts:1833-1839), so there is no way to add per-request auth in this transport.
2. Arbitrary file read in upload_markdown (src/index.ts:5461-5503)
The upload_markdown tool calls fs.readFileSync(filePath) where `fileP…
Source: NIST National Vulnerability Database 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-61560 a été découverte dans @zereight/mcp-gitlab.
Des attaquants peuvent cibler un point d'entrée spécifique comme POST /projects/ à distance pour détourner le produit.
L'exploitation peut entraîner la prise de contrôle totale du système. Score CVSS : 9.8/10.
Action : mettez à jour @zereight/mcp-gitlab vers 2.1.27 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « @zereight/mcp-gitlab CVE-2026-61560 » sur le site de l'éditeur.
CVE-2026-61560 (@zereight/mcp-gitlab) — CWE-22 / CVSS v3 9.8
Vecteur d'attaque : distant (réseau) / non authentifié / sans interaction utilisateur
Surface d'attaque : POST /projects/ / upload_markdown / file_path / GITLAB_PERSONAL_ACCESS_TOKEN
Correctif : 2.1.27 — 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 traversée de chemin (CWE-22) affecte @zereight/mcp-gitlab. Les attaquants atteignent le code vulnérable via POST /projects/ sans authentification.
Consultez l'avis de l'éditeur pour les versions affectées de @zereight/mcp-gitlab. Surface d'attaque : POST /projects/ / upload_markdown / file_path / GITLAB_PERSONAL_ACCESS_TOKEN.
Gravité : Critique (CVSS 9.8/10). L'exploitation peut entraîner la prise de contrôle totale du système.
Mettre à jour vers 2.1.27.
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 POST /projects/ (en-têtes d'auth malformés, méta-caractères SQL). Auditez les fichiers de dépendances pour trouver @zereight/mcp-gitlab.
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 '@zereight/mcp-gitlab' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
@zereight/mcp-gitlabを grep し、稼働しているサービス・バージョンを把握する。 -
2Hunt for indicators of compromise detect
grep 'POST /projects/' /var/log/nginx/access.log | grep -E '(unusual_payload|sqli_pattern)'アクセスログで
POST /projects/への異常なリクエスト (不正な認証ヘッダ・SQLメタ文字)を過去 30〜90日分捜索。WAF/SIEM があれば該当パスのアラート発火履歴を確認。 -
3Apply patch patch
Upgrade @zereight/mcp-gitlab to 2.1.27ステージング環境で 2.1.27 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスと、Step 2 で見つけた異常検知の続報チェックを含めること。
-
4Post-deployment verification verify
Replay attack against POST /projects/ on staging to confirm patch closes the vectorパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番では Step 2 と同じログクエリでアラート再発が無いか継続監視。
Paquets affectés
Références
- web github.com
- web github.com
- web github.com
- web github.com
- web nvd.nist.gov
- web github.com
- web github.com
- web github.com