Skip to content

TCC Bypass in Cursor's macOS Application

Low
arvid220u published GHSA-x352-xv29-r74m Sep 24, 2024

Package

Cursor (macOS)

Affected versions

< 0.41.0

Patched versions

0.41.0

Description

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/

Severity

Low

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Changed
Confidentiality
Low
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N

CVE ID

CVE-2024-45599

Weaknesses

No CWEs

Credits