Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Vulnerabilities

PoC Code Published for High-Severity macOS Sandbox Escape Vulnerability

A security researcher has published details and proof-of-concept (PoC) code for a macOS vulnerability that could be exploited to escape a sandbox and execute code within Terminal.

A security researcher has published details and proof-of-concept (PoC) code for a macOS vulnerability that could be exploited to escape a sandbox and execute code within Terminal.

Tracked as CVE-2022-26696 (CVSS score of 7.8), the security defect was identified and reported last year, with a patch available since the release of macOS Monterey 12.4 in May.

In its advisory, Apple notes that the flaw allowed a sandboxed process to circumvent sandbox restrictions, and that improved environment sanitization resolved the issue.

Successful exploitation of the vulnerability would require for the attacker to be able to execute low-privileged code on the target system.

“The specific flaw exists within the handling of XPC messages in the LaunchServices component. A crafted message can trigger execution of a privileged operation,” Trend Micro’s Zero Day Initiative (ZDI) explains.

An attacker able to exploit this vulnerability could “escalate privileges and execute arbitrary code in the context of the current user,” ZDI says.

According to SecuRing researcher Wojciech Reguła, who was credited for reporting CVE-2022-26696, the root cause of the bug is that macOS allows sandboxed applications to launch processes that do not inherit the main app’s sandbox profile.

The platform also allows for applications to be spawned with environment variables, and CVE-2022-26696 was identified in this mechanism.

Advertisement. Scroll to continue reading.

Regula discovered that, on the one hand, a specific function was returning ‘Yes’ when a specific environment variable was set, while, on the other hand, some environment variables were not cleared when the function returned ‘Yes’.

This, the researcher says, allowed him to “execute code within the Terminal.app context without any sandbox”.

On Friday, Reguła published details on the code needed to exploit the flaw, as well as a video demonstration on how a weaponized Word document can be used to escape the sandbox and execute code within the Terminal.

“Executing code within the Terminal.app context can be really dangerous as it can also have some TCC permissions already granted,” the researcher points out.

Related: Apple Patches Remote Code Execution Flaws in iOS, macOS

Related: Apple Patches Over 100 Vulnerabilities With Release of macOS Ventura 13

Related: Apple Warns of macOS Kernel Zero-Day Exploitation

Written By

Ionut Arghire is an international correspondent for SecurityWeek.

Click to comment

Trending

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

Join the session as we discuss the challenges and best practices for cybersecurity leaders managing cloud identities.

Register

SecurityWeek’s Ransomware Resilience and Recovery Summit helps businesses to plan, prepare, and recover from a ransomware incident.

Register

People on the Move

Mike Dube has joined cloud security company Aqua Security as CRO.

Cody Barrow has been appointed as CEO of threat intelligence company EclecticIQ.

Shay Mowlem has been named CMO of runtime and application security company Contrast Security.

More People On The Move

Expert Insights

Related Content

Vulnerabilities

Less than a week after announcing that it would suspended service indefinitely due to a conflict with an (at the time) unnamed security researcher...

Data Breaches

OpenAI has confirmed a ChatGPT data breach on the same day a security firm reported seeing the use of a component affected by an...

IoT Security

A group of seven security researchers have discovered numerous vulnerabilities in vehicles from 16 car makers, including bugs that allowed them to control car...

Vulnerabilities

A researcher at IOActive discovered that home security systems from SimpliSafe are plagued by a vulnerability that allows tech savvy burglars to remotely disable...

Risk Management

The supply chain threat is directly linked to attack surface management, but the supply chain must be known and understood before it can be...

Cybercrime

Patch Tuesday: Microsoft calls attention to a series of zero-day remote code execution attacks hitting its Office productivity suite.

Vulnerabilities

Patch Tuesday: Microsoft warns vulnerability (CVE-2023-23397) could lead to exploitation before an email is viewed in the Preview Pane.

IoT Security

A vulnerability affecting Dahua cameras and video recorders can be exploited by threat actors to modify a device’s system time.