{"id":2549,"cve":"CVE-2026-111059","cve_url":"https:\/\/www.cvedetails.com\/cve\/CVE-2026-111059\/","cwe":"CWE-79","cwe_number":79,"cwe_url":"https:\/\/cwe.mitre.org\/data\/definitions\/79","cvss_score":6.1,"published":"2026-10-19","owasp":"A03 Injection","odc":"Assignment","cdc":"Incorrect Assignment","category":"Input Validation and Sanitization","subcategory":"Insecure Parsing or Deserialization","scope":"Remote","impact":"Arbitrary Code Execution","summary":"XSS via unsanitized Markdown in Mercury <\u202f3.2.11 allowing HTML injection.","permalink":"https:\/\/netpack.pt\/vaitp\/vulnerability\/CVE-2026-111059\/","description":"Mercury is a Python framework for sharing Jupyter notebooks as web applications and dashboards. From 3.0.0 until 3.2.11, mr.Markdown converts attacker-controlled Markdown to HTML without sanitizing raw HTML before assigning it to an ipywidgets.HTML sink. Event-handler attributes and other active HTML can therefore reach the DOM and execute when another user views the application. This issue is fixed in version 3.2.11.","solution":"Upgrade Mercury to version\u202f3.2.11\u202for later.","affected_component":"Python","fixed_by_upgrading":true,"vulnerable_code":"import mr\nimport ipywidgets as widgets\n\ndef render_markdown(md_text: str) -> widgets.HTML:\n    # VULNERABLE: raw HTML from user input is rendered without sanitization\n    html_content = mr.Markdown(md_text).value\n    return widgets.HTML(value=html_content)\n","patched_code":"import mr\nimport ipywidgets as widgets\n\ndef render_markdown(md_text: str) -> widgets.HTML:\n    # FIX: enable sanitization to strip unsafe HTML tags and attributes\n    html_content = mr.Markdown(md_text, sanitize=True).value\n    return widgets.HTML(value=html_content)\n","payload_needed":true,"payload":null,"payload_status":"model_refused","published_fix":[{"repository":"mljar\/mercury","commit_url":"https:\/\/github.com\/mljar\/mercury\/commit\/c798a85924e6614c6fea7afe5a560e4554a1d09b","commit_subject":"sanitize Markdown and HTML Message","units":[{"file":"mercury\/chat\/message.py","function":null},{"file":"mercury\/chat\/message.py","function":"Message.append_html"},{"file":"mercury\/chat\/message.py","function":"Message.set_content"},{"file":"mercury\/chat\/message.py","function":"Message._render"},{"file":"mercury\/chat\/message.py","function":"Message.__init__"},{"file":"mercury\/md.py","function":null},{"file":"mercury\/md.py","function":"Markdown"},{"file":"mercury\/md.py","function":"MarkdownWidget._add_inline_style"},{"file":"mercury\/md.py","function":"MarkdownWidget._to_html"},{"file":"mercury\/md.py","function":"MarkdownWidget.__init__"}]}],"references":null}