Injection de code dans mermaid (CVE-2026-41149)
Résumé
Injection de code dans mermaid (CVE-2026-41149). Risque d'opérations non autorisées ou de divulgation. Exploitable via classDef. Atténuation : mise à jour vers 10.9.6 ou plus.
Description d'origine
La description telle que publiée par la source (souvent en anglais).
Mermaid is a JavaScript tool that uses Markdown-inspired text to create and modify diagrams and charts. Versions 10.9.5 and earlier, as well as 11.0.0-alpha.1 through 11.14.0, are vulnerable to HTML injection under the default configuration. Specifically, the classDef directive in Mermaid state diagrams permits DOM injection that escapes the SVG context. However, tags are stripped, which prevents cross-site scripting (XSS). This issue has been fixed in versions 10.9.6 and 11.15.0. If developers are unable to immediately upgrade, they can work around this issue by setting "securityLevel": "sandbox", which prevents the issue by rendering the mermaid diagram in a sandboxed .
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-41149 a été découverte dans mermaid.
Des attaquants peuvent cibler un point d'entrée spécifique comme classDef à distance pour détourner le produit.
Risque d'opérations non autorisées ou de divulgation.
Action : mettez à jour mermaid vers 10.9.6 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « mermaid CVE-2026-41149 » sur le site de l'éditeur.
CVE-2026-41149 (mermaid) — CWE-94
Surface d'attaque : classDef
Correctif : 10.9.6 — appliquer immédiatement
Contournement : If you can not update to a patched version, setting "securityLevel": "sandbox" will prevent this, by rendering the mermaid diagram in a sandboxed <iframe>.
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 exécution de code arbitraire (CWE-94) affecte mermaid. Les attaquants atteignent le code vulnérable via classDef.
Consultez l'avis de l'éditeur pour les versions affectées de mermaid. Surface d'attaque : classDef.
Gravité : ?. Risque d'opérations non autorisées ou de divulgation.
Mettre à jour vers 10.9.6.
Contournement : If you can not update to a patched version, setting "securityLevel": "sandbox" will prevent this, by rendering the mermaid diagram in a sandboxed <iframe>.
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 'mermaid' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
mermaidを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply temporary workaround mitigate
If you can not update to a patched version, setting [`"securityLevel": "sandbox"`](https://mermaid.js.org/config/schema-docs/config.html#securitylevel) will prevent this, by rendering the mermaid diagram in a sandboxed `<iframe>`.パッチが適用されるまでの応急処置として、If you can not update to a patched version, setting
"securityLevel": "sandbox"will prevent this, by rendering the mermaid diagram in a sandboxed<iframe>. を実施。回避策の副作用 (機能低下) を確認した上で。 -
3Apply patch patch
Upgrade mermaid to 10.9.6ステージング環境で 10.9.6 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
4Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Paquets affectés
État des correctifs par distribution
Paquets corrigés publiés par chaque distribution pour cette CVE
- Debian DEBIAN-CVE-2026-41149 node-mermaid
- Ubuntu UBUNTU-CVE-2026-41149 node-mermaid
Références
- advisory github.com
- advisory nvd.nist.gov
- advisory github.com
- package github.com
- patch github.com
- patch github.com
- web github.com
- web github.com
- web mermaid.js.org
- web github.com