Sandbox escape via inherited Terminal environment
Published Sep 20, 2022 · Updated May 28, 2025
Sandbox escape in Terminal on Apple macOS before 12.4 allows local users to execute code outside an application sandbox via LaunchServices. Terminal trusts an attacker-set __OSINSTALL_ENVIRONMENT value, skips clearing PATH, and evaluates command substitution when LaunchServices opens it. Low-privileged code execution is required, and resulting code runs in Terminal's current-user context with any permissions already granted to it.
Summary
What happened
Sandbox escape in Terminal on Apple macOS before 12.4 allows local users to execute code outside an application sandbox via LaunchServices. Terminal trusts an attacker-set __OSINSTALL_ENVIRONMENT value, skips clearing PATH, and evaluates command substitution when LaunchServices opens it. Low-privileged code execution is required, and resulting code runs in Terminal's current-user context with any permissions already granted to it.
The record
- CVE
- CVE-2022-26696
- Published
- Sep 20, 2022
- Updated
- May 28, 2025
- Vendor
- Apple
- Product
- macOS
- Classifications
- CWE-693
- Attack vector
- local
- Privileges
- authenticated
Timeline
How it unfolded
- Sep 20, 2022CVE publishedPublication date reported by the CVE source.
- May 28, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=unspecified <12.4
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- Terminal environment-variable sandbox escape proof of conceptweaponized · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo