Description
The Android API before 17 does not properly restrict the WebView.addJavascriptInterface method, which allows remote attackers to execute arbitrary methods of Java objects by using the Java Reflection API within crafted JavaScript code that is loaded into the WebView component in an application targeted to API level 16 or earlier, a related issue to CVE-2013-4710.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 16.04 LTS | cordova-ubuntu-3.4 | No fix yet | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Metasploit 1 module
-
Android Browser and WebView addJavascriptInterface Code Execution
exploit/android/browser/webview_addjavascriptinterface
Exploit-DB 1
- Google Android 4.2 Browser and WebView - 'addJavascriptInterface' Code Execution (Metasploit) EDB-41675 · local · Dec 21, 2012 · verified
GitHub 2 repositories
-
Snip3R69/CVE-2013-4710-WebView-RCE-Vulnerability ★ 1 · May 11, 2022
Android 3.0 through 4.1.x on Disney Mobile, eAccess, KDDI, NTT DOCOMO, SoftBank, and other devices does not properly implement the WebView class, which allows remote attackers to execute arbitrary me…
-
xckevin/AndroidWebviewInjectDemo ★ 1 · Feb 19, 2019
An app demo for test android webview security issue: CVE-2012-6636
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
References
- http://www.cs.utexas.edu/~shmat/shmat_ndss14nofrak.pdf
- http://www.internetsociety.org/ndss2014/programme#session3
- [oss-security] 20140207 Re: CVE request: multiple issues in Apache Cordova/PhoneGap mailing-list
- https://support.lenovo.com/us/en/product_security/len_6421
- http://50.56.33.56/blog/?p=314
- http://developer.android.com/reference/android/os/Build.VERSION_CODES.html#JELLY_BEAN_MR1
- http://developer.android.com/reference/android/webkit/WebView.html#addJavascriptInterface%28java.lang.Object%2C%20java.lang.String%29
- JVN#62161191 third-party-advisory