diff --git a/nbconvert/exporters/html.py b/nbconvert/exporters/html.py
index 5f3ff8a00..12024adb9 100644
--- a/nbconvert/exporters/html.py
+++ b/nbconvert/exporters/html.py
@@ -124,7 +124,7 @@ class HTMLExporter(TemplateExporter):
).tag(config=True)
mermaid_js_url = Unicode(
- "https://cdnjs.cloudflare.com/ajax/libs/mermaid/10.3.1/mermaid.esm.min.mjs",
+ "https://cdnjs.cloudflare.com/ajax/libs/mermaid/10.5.0/mermaid.esm.min.mjs",
help="""
URL to load MermaidJS from.
diff --git a/share/templates/lab/mermaidjs.html.j2 b/share/templates/lab/mermaidjs.html.j2
index b08b3721d..424a8ed99 100644
--- a/share/templates/lab/mermaidjs.html.j2
+++ b/share/templates/lab/mermaidjs.html.j2
@@ -1,5 +1,5 @@
{%- macro mermaid_js(
-url="https://cdnjs.cloudflare.com/ajax/libs/mermaid/10.3.1/mermaid.esm.min.mjs"
+url="https://cdnjs.cloudflare.com/ajax/libs/mermaid/10.5.0/mermaid.esm.min.mjs"
) -%}