The Phantom Edge A Cloudflare Pastejacking Attack Farros
An attacker deployed a malicious Cloudflare Worker that intercepted requests to the author's static site and injected a fake CAPTCHA overlay. Clicking the overlay copied a command to the clipboard, tricking users into running it via the Windows Run dialog, which attempted to execute a payload using rundll32.exe.
It was supposed to be a regular day. I opened my browser, navigated to one of my web projects, and was greeted by something that immediately triggered my infosec paranoia: a reCAPTCHA verification prompt.
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 the attacker obtained valid Cloudflare API credentials or a hijacked dashboard session, allowing them to deploy a Worker and bind it to the domain's routes.
Impact
Visitors could be tricked into running a malicious command that attempted to download and execute a DLL via rundll32.exe, potentially leading to full system compromise, though the attempt failed with a network error.
What the attacker needed
Compromised Cloudflare credentials; victim visits the site; victim clicks the fake CAPTCHA; victim follows paste-and-run instructions
The fix
The author removed the rogue Worker, unbound its routes, purged the cache, revoked all API tokens, changed the account password, and verified 2FA.
How it was found
- The attacker deployed a malicious Cloudflare Worker named worker-white-shadow-3de7.
- The Worker was bound to wildcard routes of the author's domains, intercepting all HTTP requests.
- The Worker injected a fake CAPTCHA overlay into the HTML served to visitors.
- When a user clicked the fake CAPTCHA button, JavaScript copied a command-line payload to the clipboard.
- The page then instructed the user to open the Windows Run dialog, paste the payload, and press Enter.
- The pasted command attempted to use rundll32.exe to download and execute a malicious DLL, but failed with a network error.
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.
A content delivery network (CDN) like Cloudflare sits between a website's server and its visitors, speeding up loading and adding security. Here, someone gained access to the author's Cloudflare account and added a small program (a Worker) that altered every page before it reached visitors. That program showed a fake 'I'm not a robot' check; clicking it secretly put a harmful command on the visitor's clipboard and then told them to paste and run it, which could infect their computer.
What is Misconfiguration?
Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.