The vulnerability lies in the OpenShellFsBridge.writeFile function, located in extensions/openshell/src/fs-bridge.ts. The provided patch clearly shows the modification of this function to mitigate a TOCTOU race condition. The vulnerable code, which involved creating a temporary file and then renaming it, was replaced with a call to a new, more secure function, writeFileWithinRoot. This new function is designed to prevent writes outside of the intended sandbox by validating the target path against the mount root. The test cases added in extensions/openshell/src/openshell-core.test.ts further confirm that the vulnerability is related to symlink manipulation to escape the sandbox, and that the writeFile function is the entry point for this vulnerability.