CVE-2025-12695 is a sandbox-misconfiguration issue (CWE-653) in DSPy's PythonInterpreter, which runs model/user supplied Python in a Deno + Pyodide (WASM) sandbox.
Root cause: in the vulnerable version (e.g. the file shipped in release 3.0.3, retrieved from raw.githubusercontent.com/stanfordnlp/dspy/3.0.3/dspy/primitives/python_interpreter.py), PythonInterpreter.__init__ builds the default Deno command as:
args = ["deno", "run", "--allow-read"]
In Deno, --allow-read given without a path allow-list means "allow reading the whole filesystem". As a result, code executed inside the Pyodide sandbox can reach host files through the JS runtime (js.Deno.readTextFileSync, pyodide.http.pyfetch('file:///etc/passwd'), etc.). This is precisely the JFrog PoC: an agent that consumes user input and calls interpreter.execute(expr) with pyfetch("file:////etc/passwd") discloses arbitrary files such as /etc/passwd (confidentiality impact, CVSS 5.9, CWE-653).
Fix: commit f32edbdbc2a001aed41152912c2dafebfd196365 ("fix(PythonInterpreter): Remove overly permissive read permissions and add strict allow (#9081)") changed the constructor so that Deno is started with an explicit allow-list instead of an unrestricted --allow-read:
args = ["deno", "run"]
allowed_read_paths = [self._get_runner_path()]
deno_dir = self._get_deno_dir() # added by this commit
if deno_dir: allowed_read_paths.append(deno_dir)
... enable_read_paths / enable_write_paths ...
args.append(f"--allow-read={','.join(allowed_read_paths)}")
and added the regression test test_interpreter_security_filesystem_access which verifies that reading an arbitrary host file now fails with "Requires read access" unless the path was explicitly enabled. Later commits (e.g. b175ef87 path canonicalization, ab8a7658 Deno-cache isolation, 07a0f7aa dependency isolation) further hardened this allow-list but the removal of the unrestricted --allow-read — the actual fix for the arbitrary file read — is in __init__.
Vulnerable function(s) that would appear in a runtime profile:
PythonInterpreter.__init__ — the function the patch MODIFIED; it built the permissive sandbox configuration (--allow-read with no path restriction), i.e. the code that lacked the restriction.
PythonInterpreter.execute — the public entry point that ingests the untrusted code string and drives the Deno/Pyodide subprocess; it is the frame that is resident while the exploit performs the file read.
Note: _get_deno_dir and the allow-list construction were ADDED by the fix, so they are mitigations and are not reported as vulnerable. Profiler naming for Python is Class.method, so the identifiers are PythonInterpreter.__init__ and PythonInterpreter.execute.