Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
On Linux systems with AppArmor enabled, the bundled /etc/apparmor.d/cursor-sandbox profile is incomplete. The current configuration is not enough for the sandbox to work correctly inside Cursor.
What’s wrong with the profile:
-
Missing
networkrules — The profile does not allow network access. The sandbox needs it for language servers (LSP), extensions, and updates. Rules to add:network unix,andnetwork inet stream,(for bothcursor_sandboxandcursor_sandbox_remote). -
Missing
signalrules — Processes inside the sandbox cannot send/receive signals to each other, which can break process coordination and clean shutdown. Rules to add:signal send peer=cursor_sandbox,andsignal receive peer=cursor_sandbox,. -
usernscommented out — The profile ships withusernscommented and a note “Uncomment this on AppArmor 4.0”. On systems with AppArmor 4.0+, the sandbox needs user namespaces; leaving it commented causes failures. It should be uncommented so the profile works on AppArmor 4.0+. -
cursor_sandbox_remotebinary name — The remote profile only matches the binary namecursorsandbox. In some setups the binary is namedcursor-sandbox(with a hyphen). The profile should cover both, e.g./home/*/.cursor-server/bin/*/*/resources/helpers/{cursor-sandbox,cursorsandbox}.
Result: sandbox errors, no network for language servers/extensions, and process coordination issues until the profile is manually updated.
Steps to Reproduce
- Install Cursor on a Linux system with AppArmor enabled (e.g. Ubuntu 24.04) using the .deb package.
- Ensure
/etc/apparmor.d/cursor-sandboxis the one installed/updated by the Cursor .deb (default after install). - Launch Cursor and use features that rely on the sandbox (e.g. agent/terminal, language servers, extensions that run in the sandbox).
- Observe: sandbox failures, missing network for LSP/extensions, or process coordination issues.
Expected Behavior
The sandbox should work correctly without manual edits: language servers and extensions should have network access, processes inside the sandbox should be able to coordinate via signals, and user namespaces should work on AppArmor 4.0+. The profile shipped with Cursor should include the rules above so no workaround is needed.
Operating System
Linux
Version Information
Version: 2.6.11
VSCode Version: 1.105.1
Commit: 8c95649f251a168cc4bb34c89531fae7db4bd990
Date: 2026-03-03T18:57:48.001Z
Build Type: Stable
Release Track: Default
Electron: 39.6.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Linux x64 6.17.0-14-generic
Additional Information
Example workaround (what I had to do on Ubuntu 24.04 until the profile is fixed):
-
Back up the current profile (the one written by the Cursor .deb installer):
sudo cp /etc/apparmor.d/cursor-sandbox /etc/apparmor.d/cursor-sandbox.bak -
Compare
cursor-sandbox.bakwithcursor-sandboxafter any Cursor install/update to see what the installer changed. The installer’s version is missing the rules above; the .bak can hold your corrected version for comparison or restore. -
Apply the complete profile (e.g. save the suggested profile below as
cursor-sandbox-mergedand run):sudo cp /path/to/cursor-sandbox-merged /etc/apparmor.d/cursor-sandbox sudo cp /path/to/cursor-sandbox-merged /etc/apparmor.d/cursor-sandbox.bak sudo apparmor_parser -r /etc/apparmor.d/cursor-sandbox -
Make the file immutable so the Cursor .deb installer does not overwrite the fix on the next run:
sudo chattr +i /etc/apparmor.d/cursor-sandboxTo remove immutability later:
sudo chattr -i /etc/apparmor.d/cursor-sandbox
Suggested full profile (to ship in future Cursor versions):
profile cursor_sandbox /usr/share/cursor/resources/app/resources/helpers/cursorsandbox {
file,
/** ix,
capability sys_admin,
capability net_admin,
capability chown,
capability setuid,
capability setgid,
capability setpcap,
userns,
mount,
remount,
umount,
# Allow binary execution and mapping
/usr/share/cursor/resources/app/resources/helpers/cursorsandbox mr,
network unix,
network inet stream,
signal send peer=cursor_sandbox,
signal receive peer=cursor_sandbox,
}
profile cursor_sandbox_remote /home/*/.cursor-server/bin/*/*/resources/helpers/{cursor-sandbox,cursorsandbox} {
file,
/** ix,
capability sys_admin,
capability net_admin,
capability chown,
capability setuid,
capability setgid,
capability setpcap,
userns,
mount,
remount,
umount,
# Allow binary execution and mapping
/home/*/.cursor-server/bin/*/*/resources/helpers/{cursor-sandbox,cursorsandbox} mr,
network unix,
network inet stream,
signal send peer=cursor_sandbox,
signal receive peer=cursor_sandbox,
}
Request: Include the above rules (network, signal, userns, and dual binary name for remote) in the official cursor-sandbox AppArmor profile shipped with Cursor, so the sandbox works correctly on Linux with AppArmor enabled. Thanks for considering this for future releases.
Does this stop you from using Cursor
No - Cursor works, but with this issue