Mercury: Unauthenticated remote code execution via /api/terminals access control bypass
Summary
Mercury is a Python framework for sharing Jupyter notebooks as web applications and dashboards. A missing comma in the BLOCKED_PATTERNS list merges two regular expressions, so requests to /api/terminals bypass the blocklist for anonymous access and reach the terminal API of Jupyter Server. An unauthenticated attacker can open an interactive operating-system shell, execute commands and access data available to the Mercury process. The issue is fixed in version 3.2.4.
Affected
- mljar Mercury from 3.0.0 up to and including 3.2.3 (CNA range: >= 3.0.0, < 3.2.4)
Fixed in
- Version 3.2.4 (commit 8c46712) fixes CVE-2026-111057.
- Related issue CVE-2026-111058 is reported to still affect 3.2.4; the advisory GHSA-rv4m-xm3f-3ccq lists 3.2.6 as the fixed version.
Workaround
Unknown.
- Until patched, restrict network access to Mercury at the network or reverse-proxy layer. Blocklists are not a reliable control here.
Exploitation
- CISA SSVC assessment: exploitation status 'poc', automatable: yes, technical impact: total.
- A public proof of concept is included in the GitHub advisory.
- No report of in-the-wild exploitation was found. Unknown whether the combined attack has been used against real targets.
Our recommendation
- Inventory all Mercury installations, including lockfiles and container images.
- Upgrade to version 3.2.6 or later, not only to 3.2.4, to also cover CVE-2026-111058.
- Take exposed instances off the internet until patched and treat any internet-facing instance as potentially compromised.
- Review logs for requests to /api/terminals and /api/kernels and rotate secrets the Mercury process could read.
- Monitor the NVD entry, which is currently deferred.
Public exploits
PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.
Research sources
- GitHub commit 8c46712 (fix) github.com
- Mercury release v3.2.4 github.com
- GHSA-f8c7-rwf9-fmgm (vendor advisory) github.com
- GHSA-f8c7-rwf9-fmgm (GitHub Advisory Database) github.com
- GHSA-rv4m-xm3f-3ccq (vendor advisory, related issue) github.com
- OSV GHSA-rv4m-xm3f-3ccq (fixed version 3.2.6) osv.dev
- OpenCVE CVE-2026-111057 app.opencve.io
- GitLab Advisory Database CVE-2026-111057 advisories.gitlab.com
Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 30 Oct 2026, 14:12.
Original description (NVD)
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.
Sources
The tracker combines official, freely usable data sources – updated continuously:
- NVD (NIST) – CVEs, rating (CVSS), affected products
- CISA KEV – vulnerabilities confirmed by CISA as actively exploited
- CISA Vulnrichment – CISA assessment (SSVC) in the official CVE record
- FIRST EPSS – probability of exploitation
- Microsoft MSRC – Patch Tuesday: vulnerabilities, severity, updates
- PoC-in-GitHub – public proof-of-concept repositories
- Metasploit (Rapid7) – modules of the Metasploit Framework
- Exploit-DB (OffSec) – archive of public exploits (links only)
- Patch days: official vendor pages (linked per vendor) (Vendor patch days)
This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.
Affected? We can help.
We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.
