cve.bz

CAPEC-237

Escaping a Sandbox by Calling Code in Another Language

Very High severityLow likelihoodDetailed pattern

The attacker may submit malicious code of another language to obtain access to privileges that were not intentionally exposed by the sandbox, thus escaping the sandbox. For instance, Java code cannot perform unsafe operations, such as modifying arbitrary memory locations, due to restrictions placed on it by the Byte code Verifier and the JVM. If allowed, Java code can call directly into native C code, which may perform unsafe operations, such as call system calls and modify arbitrary memory locations on their behalf. To provide isolation, Java does not grant untrusted code with unmediated access to native C code. Instead, the sandboxed code is typically allowed to call some subset of the pre-existing native code that is part of standard libraries.

On this page

Ask an AI about this attack pattern

Show the promptExplain the attack pattern CAPEC-237: Escaping a Sandbox by Calling Code in Another Language: how it unfolds, what it needs and how to prevent and detect it in my systems. Use https://capec.mitre.org/data/definitions/237.html and https://cve.bz/cve/capec/237?via=ask-ai-copy, which lists recent CVEs with the weaknesses it exploits. Cite the sources.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this attack pattern's id and public links.

How the attack unfolds

  1. Explore

    The attacker looks for a way in.

    1. [Probing] The attacker probes the target application to see whether calling code of another language is allowed within a sandbox.

      1 technique
      • The attacker probes the target application to see whether calling code of another language is allowed within a sandbox.
    2. [Analysis] The attacker analyzes the target application to get a list of cross code weaknesses in the standard libraries of the sandbox.

      1 technique
      • The attacker analyzes the target application to get a list of cross code weaknesses in the standard libraries of the sandbox.
  2. Experiment

    They probe what they found.

    1. [Verify the exploitable security weaknesses] The attacker tries to craft malicious code of another language allowed by the sandbox to verify the security weaknesses of the standard libraries found in the Explore phase.

      1 technique
      • The attacker tries to explore the security weaknesses by calling malicious code of another language allowed by the sandbox.
  3. Exploit

    They carry out the attack.

    1. [Exploit the security weaknesses in the standard libraries] The attacker calls malicious code of another language to exploit the security weaknesses in the standard libraries verified in the Experiment phase. The attacker will be able to obtain access to privileges that were not intentionally exposed by the sandbox, thus escaping the sandbox.

      1 technique
      • The attacker calls malicious code of another language to exploit the security weaknesses in the standard libraries.

Skills required

  • High skill

    The attacker must have a good knowledge of the platform specific mechanisms of signing and verifying code. Most code signing and verification schemes are based on use of cryptography, the attacker needs to have an understand of these cryptographic operations in good detail.

Resources required

  • None: No specialized resources are required to execute this type of attack.

Consequences

What a successful attack can lead to
ImpactAffectsNote
Bypass Protection MechanismAccess Control, Authorization
Execute Unauthorized CommandsAuthorizationRun Arbitrary Code
Gain PrivilegesAccountability, Authentication, Authorization, Non-Repudiation

Mitigations

  • Assurance: Sanitize the code of the standard libraries to make sure there is no security weaknesses in them.

  • Design: Use obfuscation and other techniques to prevent reverse engineering the standard libraries.

  • Assurance: Use static analysis tool to do code review and dynamic tool to do penetration test on the standard library.

  • Configuration: Get latest updates for the computer.

Weaknesses it exploits

  • CWE-693 Protection Mechanism Failure

Recent CVEs with these weaknesses

  1. 2.0CVE-2026-138390

    A flaw has been found in agent0ai agent-zero up to 2.16. Affected by this vulnerability is the function InfectionChecker.gate of the file plugins/_infection_check/helpers/checker.py. Executing a manipulation can lead to protection mechanis…

  2. 0.9CVE-2026-138386

    A security flaw has been discovered in Aider-AI Aider up to 0.86.2. The impacted element is the function confirm_ask of the file aider/io.py of the component Shell Command Confirmation Handler. The manipulation results in protection mechan…

  3. 5.5CVE-2026-138100

    A security flaw has been discovered in MassGen up to 0.1.97. Affected by this issue is the function __init__ of the file massgen/filesystem_manager/_filesystem_manager.py. Performing a manipulation results in protection mechanism failure. …

  4. 3.1CVE-2026-107951

    Improper Content Security Policy (CSP) configuration in the BigFix MCM WebUI allowed the data: URI scheme as a source in the img-src directive of the CSP header. This potentially weakens the application's defense-in-depth security mechanis…

  5. 6.3CVE-2026-110699

    Chainlit is vulnerable to a file upload block bypass in the "spontaneous_file_upload" functionality. Disabling the feature with the "enabled = false" option only affects the frontend, while the backend upload endpoints remain active and ca…

  6. 9.4CVE-2026-135203

    In Eclipse Ditto versions 0.3.0-M1 through 3.8.15 and 3.9.0 through 3.9.9, the JavaScript payload mapper of the connectivity service executes user-supplied mapping scripts in a Mozilla Rhino engine without a ClassShutter. A mapping script …

  7. 6.7CVE-2026-123914

    VMware ESX contains a security bypass vulnerability due to improper protection of the host configuration store. Broadcom has evaluated the severity of this issue to be in the Moderate severity range with a maximum CVSSv3 base score of 6.7.…

  8. 5.2CVE-2026-123909

    VMware vCenter contains a vulnerability due to a policy enforcement failure in vDS (vSphere Distributed Switch). Broadcom has evaluated the severity of this issue to be in the Moderate severity range with a maximum CVSSv3 base score of 5.2…

The newest records naming one of them. Each weakness's page lists them all.

Part of

Examples

Exploit: Java/ByteVerify.C is a detection of malicious code that attempts to exploit a vulnerability in the M…

Exploit: Java/ByteVerify.C is a detection of malicious code that attempts to exploit a vulnerability in the Microsoft Virtual Machine (VM). The VM enables Java programs to run on Windows platforms. The Microsoft Java VM is included in most versions of Windows and Internet Explorer. In some versions of the Microsoft VM, a vulnerability exists because of a flaw in the way the ByteCode Verifier checks code when it is initially being loaded by the Microsoft VM. The ByteCode Verifier is a low level process in the Microsoft VM that is responsible for checking the validity of code - or byte code - as it is initially being loaded into the Microsoft VM. Java/ByteVerify.C attempts to download a file named "msits.exe", located in the same virtual directory as the Java applet, into the Windows system folder, and with a random file name. It then tries to execute this specific file. This flaw enables attackers to execute arbitrary code on a user's machine such as writing, downloading and executing additional malware. This vulnerability is addressed by update MS03-011, released in 2003.

MITRE's words, unchanged: CAPEC-237 at MITRE. CAPEC is Copyright © 2007–2026, The MITRE Corporation, used under the CAPEC terms of use: “The MITRE Corporation (MITRE) hereby grants you a non-exclusive, royalty-free license to use Common Attack Pattern Enumeration and Classification (CAPEC™) for research, development, and commercial purposes. Any copy you make for such purposes is authorized provided that you reproduce MITRE’s copyright designation and this license in any such copy.” CAPEC and the CAPEC logo are trademarks of The MITRE Corporation. Credits. All attack patterns.