Impact
What kind of vulnerability is it? Who is impacted?
If a user on macOS has granted Cursor access to the camera or microphone, any program that is run on the machine is able to access the camera or the microphone without explicitly being granted access, through a DyLib Injection using the DYLD_INSERT_LIBRARIES
environment variable.
The usage of com.apple.security.cs.allow-dyld-environment-variables and com.apple.security.cs.disable-library-validation allows an external dynamic library to be injected into the application using the DYLD_INSERT_LIBRARIES
environment variable.
Moreover, the entitlement com.apple.security.device.camera allows the application to use the host camera and com.apple.security.device.audio-input allows the application to use the microphone.
This means that untrusted code that is executed on the user's machine can access the camera or the microphone, if the user has already given permission for Cursor to do so.
Patches
Has the problem been patched? What versions should users upgrade to?
Yes. In 0.41.0, the entitlements have been split by process: the main process gets the camera and microphone entitlements, but not the DyLib entitlements, whereas the extension host process gets the DyLib entitlements but not the camera or microphone entitlements.
Workarounds
Is there a way for users to fix or remediate the vulnerability without upgrading?
Do not explicitly give Cursor the permission to access the camera or microphone if untrusted users can run arbitrary commands on your machine.
References
Are there any links users can visit to find out more?
The same issue was found in Telegram's macOS app in 2023. The following is a good writeup about it: https://danrevah.github.io/2023/05/15/CVE-2023-26818-Bypass-TCC-with-Telegram/
Impact
What kind of vulnerability is it? Who is impacted?
If a user on macOS has granted Cursor access to the camera or microphone, any program that is run on the machine is able to access the camera or the microphone without explicitly being granted access, through a DyLib Injection using the
DYLD_INSERT_LIBRARIES
environment variable.The usage of com.apple.security.cs.allow-dyld-environment-variables and com.apple.security.cs.disable-library-validation allows an external dynamic library to be injected into the application using the
DYLD_INSERT_LIBRARIES
environment variable.Moreover, the entitlement com.apple.security.device.camera allows the application to use the host camera and com.apple.security.device.audio-input allows the application to use the microphone.
This means that untrusted code that is executed on the user's machine can access the camera or the microphone, if the user has already given permission for Cursor to do so.
Patches
Has the problem been patched? What versions should users upgrade to?
Yes. In 0.41.0, the entitlements have been split by process: the main process gets the camera and microphone entitlements, but not the DyLib entitlements, whereas the extension host process gets the DyLib entitlements but not the camera or microphone entitlements.
Workarounds
Is there a way for users to fix or remediate the vulnerability without upgrading?
Do not explicitly give Cursor the permission to access the camera or microphone if untrusted users can run arbitrary commands on your machine.
References
Are there any links users can visit to find out more?
The same issue was found in Telegram's macOS app in 2023. The following is a good writeup about it: https://danrevah.github.io/2023/05/15/CVE-2023-26818-Bypass-TCC-with-Telegram/