Sensitive Information Leakage via Hardcoded IPC Socket Path in Codex VSCode plugin
What version of Codex is running?
codex_vscode 0.78.0 openai.chatgpt_0.5.58
What subscription do you have?
apikey
Which model were you using?
_No response_
What platform is your computer?
_No response_
What issue are you seeing?
I am using this extension in a VS Code Remote-SSH environment on a shared Linux server. I discovered a serious security flaw where I can see the chat history and active AI sessions of other Linux users on the same machine.
The root cause appears to be that the extension uses a hardcoded, non-unique path /tmp/codex-ipc/ipc.sock for its IPC (Inter-Process Communication). When multiple users are logged into the same server, their VS Code instances attempt to connect to the same socket file, leading to cross-user data leakage.
What steps can reproduce the bug?
User A logs into a shared Linux server via Remote-SSH and uses the Codex extension.
The extension creates a directory /tmp/codex-ipc/ and a socket /tmp/codex-ipc/ipc.sock owned by User A.
User B logs into the same server as a different Linux user and opens VS Code.
When User B opens the Codex sidebar, the extension connects to the existing socket owned by User A.
User B now sees User A's private chat history and can potentially interact using User A's API context/key.
Checking the /tmp directory on the remote server reveals the ownership conflict:
$ ll /tmp/codex-ipc
total 100
drwxrwxr-x 2 userA userA 4096 Jan 9 15:21 ./
drwxrwxrwt 661 root root 94208 Jan 9 18:31 ../
srwxrwxr-x 1 userA userA 0 Jan 9 15:21 ipc.sock=
In this scenario, if User B starts the extension, it mistakenly attaches to the socket created by User A instead of initializing its own private session.
What is the expected behavior?
The IPC socket path must be unique per user to ensure data isolation.
Recommended fix: Include the UID in the path, e.g., /tmp/codex-ipc-<UID>/ipc.sock, or store the socket within the user's own home directory (e.g., ~/.vscode-server/data/...).
Additional information
Environment
OS: Linux (Remote-SSH)
Extension Name: codex_vscode (v0.78.0) / openai.chatgpt (v0.5.58)
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗