Skip to content
Access control Write-up Advanced

Where’s the Interpreter!? (CVE-2021-30853)

An unsigned, non-notarized application containing a script without an interpreter (shebang) was allowed to run despite being quarantined, bypassing File Quarantine, Gatekeeper, and notarization checks. An attacker could trick a user into double-clicking a malicious file, leading to full system compromise.

objective-see.com

Published on objective-see.com

Objective-See's research, tools, and writing, are supported by the "Friends of Objective-See" such as:

The author, on objective-see.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a kernel flaw in the Apple System Policy kernel extension: when an interpreter-less script causes the initial execution to fail with ENOEXEC, the fallback execution via /bin/sh skips the File Quarantine, Gatekeeper, and notarization checks.

Impact

An attacker could bypass macOS security mechanisms to run unsigned and non-notarized code, potentially leading to full system compromise, though the user must be tricked into running the application.

What the attacker needed

Victim downloads and runs malicious app; macOS 11 to 11.5

How it was found

  1. Download the proof-of-concept application from the internet, which causes it to be quarantined.
  2. Launch the application by double-clicking it.
  3. Observe that the application executes and opens Calculator.app without being blocked.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

macOS normally blocks apps downloaded from the internet unless they are signed by a known developer and checked by Apple (Gatekeeper and notarization). This bug let a malicious app run anyway because its startup script was missing the usual line that names the program meant to run it, so macOS fell back to running it through the shell without performing the security checks.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.