{"id":2546,"cve":"CVE-2026-111057","cve_url":"https:\/\/www.cvedetails.com\/cve\/CVE-2026-111057\/","cwe":"CWE-185","cwe_number":185,"cwe_url":"https:\/\/cwe.mitre.org\/data\/definitions\/185","cvss_score":10,"published":"2026-10-19","owasp":"A01 Broken Access Control","odc":"Checking","cdc":"Missing Check","category":"Authentication, Authorization, and Session Management","subcategory":"Privilege Escalation","scope":"Remote","impact":"Arbitrary Code Execution","summary":"Unauthenticated bypass of blocklist allows terminal API access, leading to OS command execution.","permalink":"https:\/\/netpack.pt\/vaitp\/vulnerability\/CVE-2026-111057\/","description":"Mercury is a Python framework for sharing Jupyter notebooks as web applications and dashboards. From 3.0.0 until 3.2.4, a missing comma in BLOCKED_PATTERNS concatenates the \/lab and \/api\/terminals regular-expression literals. Requests to \/api\/terminals therefore bypass the anonymous endpoint blocklist and reach Jupyter Server's terminal API. An unauthenticated attacker can use the resulting interactive operating-system shell to execute commands and access data available to the Mercury process. This issue is fixed in version 3.2.4.","solution":"Upgrade Mercury to version\u202f3.2.4 or later.","affected_component":"Mercury","fixed_by_upgrading":true,"vulnerable_code":"import re\n\n# Mercury endpoint blocklist\nBLOCKED_PATTERNS = [\n    r\"^\/lab\"                     # VULNERABLE: missing comma causes regex concatenation\n    r\"^\/api\/terminals\",\n]\n\ndef is_blocked(path: str) -> bool:\n    \"\"\"Return True if the request path matches any blocked pattern.\"\"\"\n    for pat in BLOCKED_PATTERNS:\n        if re.match(pat, path):\n            return True\n    return False\n\ndef handle_request(path: str):\n    if is_blocked(path):\n        raise PermissionError(\"Anonymous access denied\")\n    # Normal request handling continues here\n    return f\"Handled {path}\"\n","patched_code":"import re\n\n# Mercury endpoint blocklist\nBLOCKED_PATTERNS = [\n    r\"^\/lab\",                    # FIX: added missing comma to separate patterns\n    r\"^\/api\/terminals\",\n]\n\ndef is_blocked(path: str) -> bool:\n    \"\"\"Return True if the request path matches any blocked pattern.\"\"\"\n    for pat in BLOCKED_PATTERNS:\n        if re.match(pat, path):\n            return True\n    return False\n\ndef handle_request(path: str):\n    if is_blocked(path):\n        raise PermissionError(\"Anonymous access denied\")\n    # Normal request handling continues here\n    return f\"Handled {path}\"\n","payload_needed":false,"payload":null,"payload_status":"none","published_fix":[{"repository":"mljar\/mercury","commit_url":"https:\/\/github.com\/mljar\/mercury\/commit\/8c467129037ee9df269d543ac217ffd33b97bf3f","commit_subject":"fix: block unauthenticated terminal access","units":[{"file":"mercury\/__init__.py","function":null},{"file":"mercury_app\/block_handler.py","function":null}]}],"references":null}