Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Dev Container port forwarding can’t forward ports lower then 1024 to the same port. Instead another random high port number is chosen.
When trying to forward a port under 1024 (eg port 80) inside a dev container, the port is always forwarded to a random high port number instead of the original port number.
This happens both when automatically forwarding a port and when manually forwarding it.
Having the port listed in devcontainer.json does not help
Port forwarding in the exact same dev container works fine in VSCode.
I am using the Anysphere dev container plugin (lastest version; v1.0.25)
This has worked correctly before, I am unsure which version caused this regression.
This problem causes issues where a correct port is expected instead of a random one every time the container is started.
Steps to Reproduce
- Have a dev container that exposes a port under 1024 (eg port 80)
- Start the container
- Go to the ports tab
- The low port number is now forwarded to a random high port number.
Alternatively:
- Have a dev container that exposes a port under 1024 (eg port 80)
- Start the container
- Go to the ports tab
- Remove all port forwards
- Add a new port with the ‘Add Port’ button.
- Chose a low port number
- The low port number is now forwarded to a random high port number.
Expected Behavior
I expect all port numbers to be able to be forwarded correctly, not just ports above 1024.
Operating System
Windows 10/11
Current Cursor Version (Menu → About Cursor → Copy)
Version: 1.7.46 (user setup)
VSCode Version: 1.99.3
Commit: b9e5948c1ad20443a5cecba6b84a3c9b99d62580
Date: 2025-10-14T01:21:46.830Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.26100
Does this stop you from using Cursor
No - Cursor works, but with this issue