Skip to content

Independent cybersecurity briefing

Latest

RSS
Breaches, bounties, zero-days, and AI.

Bug Bounty Write Ups

Apple Webcam Hack: The $100,500 Safari UXSS Chain

*AI-assisted: drafted with AI help from public sources, then reviewed and edited. This is an analytical case study of a public disclosure, not my own discovery.*

Adam Hale, ZeroDay Times editorBy Adam Hale3 min read

Still life for “Apple Webcam Hack: The $100,500 Safari UXSS Chain”: a magnifier and a sealed envelope, dark grove, Apple mark, signal CASE. [ BUG BOUNTY ] badge.

AI-generated illustration

One click on “Open” for a shared iCloud file let a website run code on any site you had visited, webcam included. Apple paid $100,500

AI-assisted: drafted with AI help from public sources, then reviewed and edited. This is an analytical case study of a public disclosure, not my own discovery.

A victim agrees to view one harmless shared iCloud image. Later, without another prompt, the sharer’s website can run JavaScript inside Gmail, PayPal, iCloud or a video-call site with camera access. That was Ryan Pickren’s second Apple webcam hack, reported in July 2021 and rewarded with $100,500.

Disclaimer: * Educational and defensive use only. Apple fixed these issues in macOS Monterey 12.0.1 and Safari 15 (CVE-2021–30861). File formats and payload details are intentionally omitted.*

Vulnerability Overview

  • Type: Universal cross-site scripting (UXSS) in Safari, reached through a trust-on-first-use design flaw in iCloud sharing and a Gatekeeper bypass
  • CWE (analytical mapping): CWE-693 (Protection Mechanism Failure), CWE-356 (Product UI Does Not Warn User of Unsafe Actions)
  • CVE: CVE-2021–30861 (used in the chain); the research produced four 0-days in total. CVSS not reported in the source
  • Bounty: $100,500

How the Apple Webcam Hack Worked (high level)

After his 2020 camera bugs, Apple only allowed camera access on HTTPS origins matching saved permissions. So Pickren needed a UXSS: code running inside a trusted origin, not just a borrowed permission.

His target was Safari’s webarchive format. A saved webarchive declares which origin its content belongs to, so opening a malicious one is UXSS by design. Modern macOS blocks that: downloads need consent, and Gatekeeper refuses quarantined webarchives. The chain had to get around both.

  1. A trusted launcher. Safari opens a few Apple URL schemes without asking. One launches ShareBear, the iCloud sharing helper.
  2. Consent that never expired. ShareBear asked once whether to open a shared file. After “Open”, the file owner could later change its content and extension, and the site could relaunch it silently. A PNG today could be something else tomorrow.
  3. A shortcut Gatekeeper did not question. An old shortcut file type could tell Safari to open a local webarchive without the quarantine check. Mounting a disk image gave that webarchive a predictable path.

Result: injected code in any origin the attacker chose, such as a video-call site with camera permission or iCloud’s photo library.

Business Impact

UXSS is close to a full browser compromise: every logged-in session is readable and every saved permission is usable. The only user action was one plausible “Open” click.

Fixing Apple Webcam Hack-Style Trust Chains (my own analysis)

Apple’s fixes: ShareBear now reveals files instead of launching them, and WebKit refuses to open quarantined files. The broader lessons:

1. Bind consent to content. Approving a file should approve those exact bytes and type. Any change means asking again.

2. Enforce quarantine where content renders. Checks only at the front door miss every side entrance.

3. Treat helper-app URL schemes as attack surface. Silently launched apps inherit the browser’s trust.

# Pseudocode: consent covers one exact file version, and quarantined files never render
def open_shared_file(share_id, user):
    f = icloud.fetch(share_id)
    grant = consents.get(user, share_id)
    fingerprint = (sha256(f.bytes), f.type)
    if grant is None or grant.fingerprint != fingerprint:
        if not prompt(user, f.name, f.type):        # changed file = new prompt
            return "declined"
        consents.save(user, share_id, fingerprint)
    return finder.reveal(f)                          # reveal, never auto-launch
def render(local_file):
    if quarantine.flagged(local_file) and not gatekeeper.approved(local_file):
        return "blocked"                             # checked at render time
    return webkit.load(local_file)
# Test: owner swaps PNG for an archive -> prompt shown again; archive never renders

Key Takeaways

  • Trust-on-first-use without versioning is a standing remote launch permission.
  • Chains beat single bugs: none of these links alone looked critical.
  • Enforce security checks where content executes, not only where it arrives.

Credit & Sources

Discovered and reported by Ryan Pickren. Primary source: Hacking the Apple Webcam (again), covering the July 2021 report, fixes in early 2022 and the $100,500 bounty. Facts come from that write-up; analysis and code are original.

Next breakdown: another real bug bounty case. Follow @masimshahzad for daily bug bounty breakdowns.

First published by Adam Hale on Medium.

Sources

Share

Corrections and tips:[email protected]