Skip to main content
Mallory
MediumExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2021-30657: macOS Gatekeeper Bypass in syspolicyd

Published Sep 8, 2021 · Updated 1 month ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS5.5Medium · v3.1
EPSS68.5%99th percentile
CISA KEVYesAdded Nov 3, 2021
In the wildActivePer CISA KEV
Vendor
Apple
IdentifiersCVE-2021-30657CWE-840

CVE-2021-30657 is a macOS Gatekeeper bypass vulnerability caused by a logic flaw in Apple’s user-mode system policy daemon, syspolicyd. Apple described the issue as a logic issue addressed through improved state management. On vulnerable versions of macOS, a malicious application can be crafted so that Gatekeeper does not properly enforce its normal verification and execution checks, allowing untrusted code to run without the expected security prompt or blocking behavior. Public analysis indicates the flaw could be abused using payloads such as shell or Python scripts disguised with an application-style extension and delivered in a disk image, leading the operating system to execute the payload without proper Gatekeeper intervention. Apple fixed the issue in macOS Big Sur 11.3 and Security Update 2021-002 for Catalina, and reported awareness of active exploitation in the wild.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows an attacker to bypass Gatekeeper protections intended to prevent execution of untrusted or insufficiently validated applications. This can enable initial code execution on a target Mac outside the normal trust and notarization workflow, including non-sandboxed execution paths depending on the delivered payload. In practical terms, the vulnerability can be used to launch malicious code that would otherwise be blocked or subjected to stronger user-facing security controls, facilitating malware delivery and follow-on actions such as credential theft, persistence, or broader compromise in the context of the logged-in user.

Mitigation

If you can’t patch tonight, do this now.

Until patching is complete, reduce exposure by restricting execution of untrusted applications and disk images, limiting user ability to open software obtained from untrusted sources, and monitoring for suspicious interpreter execution patterns associated with application-style filenames. Additional defensive measures include application allowlisting, endpoint controls that enforce notarization or trusted-developer policies beyond native Gatekeeper behavior, and detection of script interpreters launched in anomalous application execution chains. User awareness measures that discourage opening unexpected downloaded application bundles or disk images also reduce exploitability.

Remediation

Patch, then assume compromise.

Apply Apple’s security updates that address CVE-2021-30657. The issue is fixed in macOS Big Sur 11.3 and Security Update 2021-002 for macOS Catalina. Systems running affected unpatched releases should be upgraded to a version containing Apple’s improved state-management fix in syspolicyd.

Public exploits

Exploits

2 exploits validated by Mallory's analysis.

View more in app →
osx_gatekeeper_bypass.rbThis repository contains a single Metasploit module (osx_gatekeeper_bypass.rb) that exploits two macOS Gatekeeper bypass vulnerabilities: CVE-2021-30657 and CVE-2022-22616. The module sets up an HTTP server that delivers a specially crafted macOS app bundle inside a zip (or gzip-compressed zip) archive. When a user on a vulnerable macOS version visits the server (typically via Safari), the archive is automatically extracted and, due to the vulnerabilities, the app can be executed without triggering Gatekeeper's security checks. The exploit supports multiple payload types (native x64, Python, or command) and is configurable via Metasploit options. The main attack vector is browser-based social engineering, requiring the victim to visit a malicious URL. The module is operational and can be used to achieve code execution on vulnerable macOS systems.Disclosed Mar 25, 2021 · Framework: metasploit · ruby · browser · networkWeaponizedCVE-2021-30657This repository is a proof-of-concept (POC) exploit for CVE-2021-30657, a vulnerability in macOS's syspolicyd that allows attackers to bypass Gatekeeper and related security features. The exploit consists of two main scripts: 'payload.sh', which contains the shell script to be executed on the victim's machine, and 'setup.sh', which packages the payload into a macOS app bundle and creates a DMG disk image ('bait.dmg'). The attacker is expected to replace 'payload.sh' with any desired shell script. When the victim mounts the DMG and double-clicks the app, the payload executes without triggering Gatekeeper or notarization checks. The exploit targets macOS Big Sur versions prior to 11.3 and Catalina Security Update prior to 2021-002. The repository is structured simply, with clear separation between the payload and the packaging logic, and is intended for demonstration and testing of the vulnerability.shubham0d · Disclosed Nov 7, 2021 · bash · localPoC
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
AppleMac Os Xoperating_system
AppleMacosoperating_system
FAQ

Frequently asked questions

Is CVE-2021-30657 exploited in the wild?
Yes. As of Oct 16, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Nov 3, 2021.
Is there a public exploit for CVE-2021-30657?
Yes. Mallory tracks 2 public exploits or proofs of concept for CVE-2021-30657, the earliest disclosed Mar 25, 2021.
Is there a patch for CVE-2021-30657?
Apply Apple’s security updates that address CVE-2021-30657. The issue is fixed in macOS Big Sur 11.3 and Security Update 2021-002 for macOS Catalina.
What products are affected by CVE-2021-30657?
Apple Macos and Apple Mac Os X.
How severe is CVE-2021-30657?
CVE-2021-30657 has a CVSS v3.1 score of 5.5 (Medium) and an EPSS score of 68.5% (99th percentile) as of Oct 16, 2026.
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malware1Malware families linked to this CVE, with evidence and IOCs.
Detection signatures1YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activityCommunity discussion across Reddit, Mastodon, and other social sources.