Summary
According to Cyera’s researchers, products using Pyodide (Python on WebAssembly) treated blocking dangerous modules such as os and subprocess as isolation, while ctypes and Emscripten-exported functions remained reachable. From there, supposedly restricted Python could cross out of CPython-in-WASM into the JavaScript host. This is a research demonstration, not real-world harm at any product. Unless what a runtime can reach is checked, before code runs with host privileges, against a decided scope rather than a blocklist, isolation passes as appearance only.
A pre-execution check means checking, before untrusted code runs with host privileges, what its runtime can reach against a decided scope, and keeping a record. Detection means researchers finding and reporting the escape path. Dates are those of CVE assignment, the talk, and coverage.
Four CVEs (CVSS 8.3–9.9, per Cyera)
What got through
- What got through
- Use of
ctypesand Emscripten-exported functions from inside restricted Python. The products’ blocklists did not account for them, and from there the code could cross into the JS host (as reported by Cyera’s researchers). - What was stopped
- Imports of dangerous modules. The blocking worked, but on its own it did not form a boundary (Cyera).
- What reached the receiving side
- In general, once code inside a sandbox reaches the host, whatever the host environment can do becomes the impact. Cyera says that means filesystem, process, and environment APIs on Node.js; publishing tokens, signing keys, and source in CI/CD; and API credentials, internal services, and databases in AI-agent environments.
- Not disclosed
- Whether this path was actually exploited at any product. This Brief covers a research demonstration and does not assert real damage at any product.
Pre-execution check
Whatever the route, the condition for telling them apart is that, before untrusted code runs with host privileges, which host capabilities its runtime can reach (files, processes, credentials, exposed functions) is checked against a scope decided outside the runtime, not against a list of blocked modules.
Unless what a runtime can reach is checked, before code runs with host privileges, against a decided scope rather than a blocklist, isolation passes as appearance only.
- Who approves
- The operator who embeds and deploys the runtime, deciding which capabilities each piece of code may have. A setting that says “dangerous modules are blocked” is not an approval.
- Where it is checked
- Immediately before code moves to execution with host privileges. What is checked is the set of capabilities the runtime exposes to the host, not whether imports are allowed. If anything beyond the decided scope is exposed, the run is held.
- What is recorded
- Which code ran (or was held), under which scope, and when. Later, it shows what ran in which runtime.
The blocking of dangerous modules worked. But the WASM that Pyodide runs on only protects its own linear memory; it does not close off capabilities the embedding environment intentionally exposes (Cyera). Dangerous calls and anomalous process creation can be caught afterwards by monitoring. What was missing is the layer before that, which checks what the runtime can reach. Cyera’s report suggests that the premise “Python import restrictions = a boundary” was shared across multiple independent products. It has the same shape as Brief 073 (ShadowMQ), where the same dangerous implementation was copied across AI inference platforms, and Brief 094 (Cursor), where a single instruction took the sandbox off: execution is not tied to a check of the isolation scope.
What Lemma does
Lemma puts the pre-execution check immediately before untrusted code moves to execution with host privileges. It does not build a sandbox or judge whether code is dangerous; before execution, it checks that the capabilities the runtime exposes to the host fall within the scope the operator decided.
Industries and operations to watch
- IndustryDevelopers & agent operations
- Developers and organizations running user-written code in WebAssembly runtimes such as Pyodide, in workflow automation, spreadsheets, or CI/CD.
- IndustryAI
- Organizations operating agent platforms that run AI-generated code inside a sandbox, with paths outside the runtime to API credentials and internal services.
Current controls vs Lemma
The route in this case is the first column: crossing from restricted Python to the host. The second column compares what can be reached after crossing.
| Control | Crossing from restricted Python to the host (ctypes, Emscripten functions) |
What can be reached after crossing (files, processes, credentials) |
|---|---|---|
Blocking dangerous modules (os, subprocess, etc.) |
Not effective | Not relevant |
| Monitoring dangerous calls and anomalous process creation | Partial | Partial |
| Maintainer design changes (n8n moved Python execution to an external runner) | Partial | Partial |
| Lemma (pre-execution check) | Effective | Partial |
Blocking dangerous modules did not account for ctypes and Emscripten functions (Cyera), and what can be reached after crossing does not change with the blocklist. Monitoring catches dangerous calls and anomalous process creation afterwards; it does not act before the crossing. Maintainer responses split by product: n8n moved Python execution to an external runner, but there was also archiving and the position that isolation should be enforced at deployment, leaving a part to the deploying side. Lemma checks the capabilities the runtime exposes to the host, not whether imports are allowed, before execution. Signing keys and API credentials need not pass straight into the runtime; only what is needed can be handed over. A record of each run is also kept, so what ran in which runtime can be confirmed later.
Note: Lemma’s check works only when it is built into the step that starts the runtime, and the allowed scope of capabilities is managed outside the runtime. If the capabilities a runtime exposes cannot be listed completely, or malicious code runs within the allowed scope, it can pass. Lemma does not change Pyodide or any product, and does not judge whether the code itself is benign. The table compares what each control checks; it does not show whether this incident would have been stopped. Lemma does not detect or prevent intrusions.
Three things to confirm for organizations that run untrusted code in a runtime
- Is the runtime’s isolation also carried by a mechanism other than blocking dangerous modules (such as separation into another process or runner)?
- Do you hand that runtime only the signing keys and API credentials it needs?
- Have you checked how the maintainers of the products you use have responded (fixes, design changes, archiving), and decided what your deployment must cover?
Facts and timeline
- Affected products
- Seven products using Pyodide (Python on WebAssembly). The principal ones are n8n (workflow automation, CVE-2025-68668, CVSS 9.9), Grist (spreadsheet/DB, CVE-2026-24002, CVSS 9.1), Cohere Terrarium (sandboxed execution for AI-generated code, CVE-2026-61522, CVSS 9.3), and Hugging Face smolagents (AI-agent framework, CVE-2026-10613, CVSS 8.3). Related concerns were also identified in langchain-sandbox, stlite, and cibuildwheel (Cyera).
- Presented by
- Cyera researchers Vladimir Tokarev and Saar Pearl, in the DEF CON 34 talk “Sandcastles, not Sandboxes”.
- The researchers’ report
- Each product blocked dangerous modules such as
osandsubprocessas its isolation, but did not account forctypesand functions exported by Emscripten, from which code could cross out of CPython-in-WASM into the JS host. - In n8n (Cyera)
- The Code node runs Python via Pyodide on Node.js. The escape could reach the n8n service process and the credentials for connected integrations.
- Scope of impact (Cyera)
- The host environment determines impact: on Node.js, filesystem/process/env APIs; in CI/CD, publishing tokens, signing keys, and source; in AI-agent environments, API credentials, internal services, and databases.
Glossary
Pyodide — A runtime that runs CPython on WebAssembly (WASM). Products embed it to run Python written by users or by AI.
ctypes and Emscripten functions — ctypes is the standard Python module for working with C functions and memory. Emscripten is the toolchain that compiles C/C++ to WebAssembly and exposes functions to the embedding environment. In Cyera's report, these two became the path out to the host.
Timeline
- 2025
- CVE-2025-68668 is assigned to the n8n flaw.
- 2026-08-07
- At DEF CON 34, Cyera presents a Pyodide sandbox escape common to seven products, with four CVEs.
- 2026-08-10
- eSecurity Planet reports on it.
- After disclosure
- n8n moves Python execution to an external runner; other products’ responses split.
This Brief concerns a research demonstration, not real-world harm. “Reproducible across seven products” is the researchers’ finding, based on Cyera’s presentation and four CVEs, and does not assert real damage at any product. n8n’s CVE carries a 2025 number, but the cross-product picture was presented at DEF CON 34 (2026-08-07). CVSS scores here follow Cyera’s own writeup. For CVE-2026-24002, NVD assigns 9.6 and the CNA (GitHub) 9.0, so the score differs by source. CVE-2026-61522 and CVE-2026-10613 were, at the time of writing, in neither NVD nor the GitHub Advisory Database. What has not been disclosed does not mean there were no controls.
After disclosure
- n8n: Moved Python execution to an external runner.
- Other maintainers: Responses split by product, across architectural changes, archiving, and the position that isolation should be enforced at deployment. Remediation status varies by product.
Sources
- primary, researchCyera Research “Sandcastles, not Sandboxes: How One Architectural Flaw Exposed Seven Products” (DEF CON 34, 2026-08)
- primary, CVENVD CVE-2025-68668 (n8n) — https://nvd.nist.gov/vuln/detail/CVE-2025-68668 / CVE-2026-24002 (Grist)
1 more (reporting, analysis)
- independenteSecurity Planet “DEF CON 34: One Pyodide Flaw Exposed Seven Products”
References: “The last layer left for cyber defense in the age of AI”