AI and data stack advisories

Severe, 6 weeks1496Projects326

1496 severe, 6 weeks · 326 projects

CursorGHSA-x352-xv29-r74m

TCC Bypass in Cursor's macOS Application

Cursor

CVE-2024-45599 · Published Sep 24, 2024

Low3.8
Fix: upgrade to 0.41.0 or later
GitHub advisory

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](http://com.apple.security.cs.allow-dyld-environment-variables/) and [com.apple.security.cs.disable-library-validation](http://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](http://com.apple.security.device.camera/) allows the application to use the host camera and [com.apple.security.device.audio-input](http://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...

Affected versions

PackageAffectedFixed in
Cursor
Product
< 0.41.00.41.0
Details and references

### 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](http://com.apple.security.cs.allow-dyld-environment-variables/) and [com.apple.security.cs.disable-library-validation](http://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](http://com.apple.security.device.camera/) allows the application to use the host camera and [com.apple.security.device.audio-input](http://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/

CVSS 3.1
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N
Severity from
GitHub (reviewed advisory)

More Cursor advisories

All Cursor