Intel

AIKIDO-2026-297931

@capacitor/android is vulnerable to Cross-Site Scripting (XSS)

Cross-Site Scripting (XSS)GHSA-rvm3-566m-v7fv Published 3 days ago

93

Critical Risk

This Affects:

JS@capacitor/android
5.7.1 - 6.2.1
Fixed in 6.2.2
7.0.0 - 7.6.8
Fixed in 7.6.9
8.0.0 - 8.4.2
Fixed in 8.4.3
8.5.0 - 8.5.0
Fixed in 8.5.1
Are you affected? Scan for Free

TL;DR

Capacitor's WebView navigation guard uses only a target URL's host and scheme, so a navigation to the internal HTTP proxy path is allowed as ordinary in-app navigation. Loading that path as a document makes the native layer fetch an arbitrary, caller specified remote URL and return the response body to the WebView at the app's own origin, regardless of whether CapacitorHttp is enabled. Script in that response then runs with full same-origin trust, including access to localStorage, cookies, and every native capability the app exposes through its registered plugins. The fix blocks navigation to the proxy path before plugins can override it, refuses the proxy for document and subframe requests, restricts it to enabled CapacitorHttp configurations, and adds a sandboxing Content-Security-Policy.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your app loads user controlled or unsanitized links inside its WebView.

Background info

@capacitor/android is vulnerable to Cross-Site Scripting (XSS) in versions 5.7.1 - 6.2.1, 7.0.0 - 7.6.8, 8.0.0 - 8.4.2 and 8.5.0 - 8.5.0.

How to fix this

Upgrade the @capacitor/android library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform