Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Hi Cursor team,
I’ve hit a reproducible bug in how Cursor resolves and injects environment variables into Dev Containers. A variable whose value contains an = character gets truncated at the first = when Cursor builds/opens the Dev Container. VS Code (Dev Containers extension) handles the same setup correctly, so this is specific to Cursor’s remote/dev-container server.
Steps to Reproduce
Setup
- Host (WSL)
~/.bashrc:export BITBUCKET_TOKEN="ATATT...=XXXXXXXX"(full value, 192 chars; unchanged for weeks). devcontainer.json:"containerEnv": { "BITBUCKET_TOKEN": "${localEnv:BITBUCKET_TOKEN}", "BITBUCKET_USERNAME": "${localEnv:BITBUCKET_USERNAME}" }
Expected Behavior
The container receives the full 192-char value, including everything after the = (as VS Code does).
Actual behavior (Cursor)
The container receives only the 183 characters before the = — the = and the trailing checksum are dropped. This produces an invalid token (downstream Bitbucket API calls fail with HTTP 401).
Evidence / root cause
On the same machine there are two servers running side by side:
- VS Code server (
~/.vscode-server/...) and all host processes:BITBUCKET_TOKENlength = 192 (correct, ends...=XXXXXXXX). - Cursor server (
~/.cursor-server/.../node) and everything it spawns inside the Dev Container:BITBUCKET_TOKENlength = 183 (truncated, ends...kCKO4w_c,=-tail missing).
I confirmed the truncation happens before the value reaches the container config — the Dev Container’s Config.Env was already 183 at creation, and the raw env line contains only the single KEY=VALUE separator (the value’s internal = is gone). No file or Windows environment variable on the machine contains the truncated value, so it is produced algorithmically during Cursor’s shell-environment resolution / ${localEnv} substitution — it appears to split KEY=VALUE on all = and keep only the field before the value’s embedded =.
Reproduction (minimal)
- On the host, export a variable whose value contains
=, e.g.export FOO="abc=def=ghi". - In
devcontainer.json:"containerEnv": { "FOO": "${localEnv:FOO}" }. - Open the folder in a Dev Container with Cursor, then run
echo "$FOO"inside the container.- VS Code result:
abc=def=ghi - Cursor result:
abc(truncated at the first=).
- VS Code result:
Impact
Any secret/token/connection-string containing = (Atlassian API tokens, base64 values with = padding, some JWTs, DB connection strings) is silently corrupted when passed into a Dev Container via Cursor. This is hard to diagnose because the value looks “present but invalid,” and interactive terminals inside the container can appear fine while background/MCP processes get the corrupted value.
Please let me know if you need additional logs (Cursor server logs, devcontainer.json, or a screen recording of the minimal repro). Happy to help reproduce.
Thanks,
Fabian
Operating System
Windows 10/11
Version Information
- Cursor on Windows + WSL2 (Ubuntu), Dev Containers with Docker-outside-of-Docker.
- Cursor server build:
4f02290ccd9304f0e6bf8ee85f6e9106f02ac1f0 - The variable is an Atlassian API token (
BITBUCKET_TOKEN) of the formATATT...<body>=<8-char checksum>, i.e. it legitimately contains a single=near the end.
Does this stop you from using Cursor
Yes - Cursor is unusable