Full Report
Gatekeeper has one job and it's not doing it for some software
Analysis Summary
# Vulnerability: macOS Gatekeeper Bypass via App Bundle Overwriting ("Evil Twin")
## CVE Details
- **CVE ID**: Not Assigned (Apple has closed the report without a CVE designation as of the article date).
- **CVSS Score**: Estimated 5.1 (Medium) - `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L`
- **CWE**: CWE-353 (Missing Support for Integrity Check), CWE-367 (Time-of-Check Time-of-Use).
## Affected Systems
- **Products**: Apple macOS.
- **Versions**: Current versions (as of July 2026).
- **Configurations**: Applications downloaded from the web (outside the Mac App Store) that have been executed at least once by the user.
- *Note:* Apps from the Mac App Store are not affected as they are owned by `root`.
## Vulnerability Description
Security researchers discovered a flaw in how Gatekeeper handles the re-validation of trusted application bundles. Once a downloaded app is authorized and run for the first time, macOS caches its "trusted" status.
The flaw allows an attacker to archive the original app bundle (using `tar`), delete the original, and replace the main executable with a malicious version. Because the bundle was previously trusted, the system appears to rely on cached trust values or treats the replaced bundle as a "locally built" application. Consequently, Gatekeeper fails to re-trigger the security prompt or block the execution of the modified, unsigned, or differently-signed code.
## Exploitation
- **Status**: PoC available (demonstrated by researchers Talal Haj Bakry and Tommy Mysk).
- **Complexity**: Low (requires basic shell commands or script execution).
- **Attack Vector**: Local (requires initial user-level code execution via a malicious script, compromised package manager, or thermal/AI agent prompt injection).
## Impact
- **Confidentiality**: Low/Medium (Malicious "twins" can present deceptive prompts to harvest credentials or access Keychain data).
- **Integrity**: High (Core application logic can be replaced with malicious code).
- **Availability**: Low (The target application remains functional but compromised).
## Remediation
### Patches
- **None**: Apple reportedly closed the issue, stating that overwriting an app bundle makes it "locally built," which falls outside the scope of Gatekeeper's primary enforcement.
### Workarounds
- **App Store Usage**: Prefer applications from the Mac App Store, as these are owned by the `root` user and cannot be overwritten by user-level processes.
- **Permission Monitoring**: Be wary of unexpected prompts for Keychain access or TCC (Transparency, Consent, and Control) permissions from previously trusted apps.
- **Developer Hardening**: Developers can implement internal integrity checks (Self-Signing validation) upon application startup.
## Detection
- **Indicators of Compromise**:
- Discrepancy between the application's binary signature and its original developer certificate.
- Presence of archive files (e.g., `.tar`) in application directories used during the swap process.
- **Detection Methods**:
- Use `codesign -vv --deep /Applications/[App].app` to manually verify the integrity of installed software.
- Monitor for unauthorized file system modifications within the `/Applications` or `~/Applications` directories by non-installer processes.
## References
- **Researcher Blog**: hxxps[://]mysk[.]blog/2026/07/23/macos-overwrite-app-executables/
- **Demonstration Video**: hxxps[://]www[.]youtube[.]com/watch?v=0bOC8S3NQxI
- **Apple Gatekeeper Documentation**: hxxps[://]support[.]apple[.]com/guide/security/gatekeeper-and-runtime-protection-sec5599b66df/web