CVE-2026-10037 Overview
CVE-2026-10037 is a sandbox escape vulnerability in the OpenJDK packages shipped with Ubuntu. The .jar MIME handlers installed by these packages execute files marked as executable when the mailcap package is present on the system. A sandboxed application with access to the OpenURI portal via xdg-desktop-portal-gtk can write a malicious .jar file to the host file system, set its executable bit, and trigger the handler. The result is arbitrary code execution outside the sandbox boundary. The flaw is classified under [CWE-20] (Improper Input Validation).
Critical Impact
A compromised sandboxed application on Ubuntu can escape its confinement and execute arbitrary code on the host with the privileges of the invoking user.
Affected Products
- Ubuntu OpenJDK packages (source package openjdk-25 and related OpenJDK builds)
- Systems with the mailcap package installed alongside OpenJDK
- Desktop environments using xdg-desktop-portal-gtk for the OpenURI portal
Discovery Timeline
- 2026-07-08 - CVE-2026-10037 published to NVD
- 2026-07-09 - Last updated in NVD database
Technical Details for CVE-2026-10037
Vulnerability Analysis
The vulnerability chains three components: the OpenJDK-provided .jar MIME handler, the mailcap package, and the OpenURI portal exposed by xdg-desktop-portal-gtk. Sandbox frameworks such as Flatpak or Snap rely on desktop portals to broker access to host resources. The OpenURI portal allows a sandboxed application to request that the host open a file or URI using its default handler.
When the host resolves a .jar file through the mailcap-driven handler installed by OpenJDK, it invokes the Java runtime on the file if the executable bit is set. This behavior converts what should be a data-open request into arbitrary code execution on the host. The sandbox contract is broken because the portal treats the file as trusted content while OpenJDK treats it as an executable program.
Root Cause
The root cause lies in the .jar mailcap entry shipped by the OpenJDK packages, which executes rather than opens the file. Combined with the OpenURI portal permitting file writes with attacker-controlled contents and executable bits, the handler crosses the security boundary between the sandbox and the host user session.
Attack Vector
An attacker requires a compromised or malicious application already running inside a sandbox that has access to xdg-desktop-portal-gtk. The application writes a crafted .jar payload to a location reachable by the host, sets the executable bit, and invokes the OpenURI portal to open the file. The host launches the Java runtime against the attacker-controlled JAR, executing arbitrary code with the privileges of the desktop user outside the sandbox. See the Launchpad Bug Report for the reproduction details.
Detection Methods for CVE-2026-10037
Indicators of Compromise
- Unexpected .jar files written to user-writable paths such as ~/.cache, ~/.local/share, or /tmp by sandboxed applications
- java or javaw process launches whose parent is xdg-desktop-portal-gtk or a portal helper
- New executable-bit changes (chmod +x) applied to .jar files by non-interactive processes
- OpenURI portal requests targeting files with the application/java-archive MIME type
Detection Strategies
- Monitor process ancestry for java invocations originating from desktop portal services rather than user shells or launchers
- Audit file creation events for .jar extensions in sandbox-writable directories followed by chmod operations
- Correlate D-Bus activity on the org.freedesktop.portal.OpenURI interface with subsequent Java process starts
Monitoring Recommendations
- Enable Linux audit rules on execve for java binaries and capture the full argument vector
- Log D-Bus portal method calls, particularly OpenURI and OpenFile, for post-incident review
- Track modifications to /etc/mailcap and per-user ~/.mailcap files that could indicate handler tampering
How to Mitigate CVE-2026-10037
Immediate Actions Required
- Apply Ubuntu security updates for the affected openjdk-* packages as soon as they are published by Canonical
- Inventory hosts where OpenJDK and mailcap are installed together and prioritize desktop endpoints running Flatpak or Snap applications
- Restrict which sandboxed applications hold the OpenURI portal permission until the packages are patched
Patch Information
No vendor patch metadata is available in the NVD record at the time of publication. Track the Launchpad Bug Report for the fix status and updated package versions across supported Ubuntu releases.
Workarounds
- Remove or override the .jar mailcap entry so that Java archives are not executed by default handlers
- Uninstall the mailcap package on systems where MIME-based execution is not required
- Deny or scope the OpenURI portal permission for untrusted sandboxed applications using Flatpak overrides or Snap interface controls
# Override the .jar mailcap handler for the current user
mkdir -p ~/.config
cat >> ~/.mailcap <<'EOF'
application/java-archive; /bin/false %s
EOF
# Revoke OpenURI portal access for an untrusted Flatpak app
flatpak override --user --nofilesystem=host --unshare=network com.example.UntrustedApp
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

