1842
{
NSString *functionString = [URL resourceSpecifier];
if ([functionString hasPrefix:@"specialFunction"])
{
// Make data available back in webview.
UIWebView *webView = [self writeDataToView:[URL query]];
}
return NO;
}
return YES;
}
A call into native code can then be initiated by passing parameters within the URL:
Example Language: JavaScript (Attack)
window.location = examplescheme://method?parameter=value
Because the application does not check the source, a malicious website loaded within this
WebView has the same access to the API as a trusted site.
Observed Examples
Reference Description
CVE-2013-5725 URL scheme has action replace which requires no user prompt and allows
remote attackers to perform undesired actions.
https://www.cve.org/CVERecord?id=CVE-2013-5725
CVE-2013-5726 URL scheme has action follow and favorite which allows remote attackers to
force user to perform undesired actions.
https://www.cve.org/CVERecord?id=CVE-2013-5726
MemberOf Relationships
This MemberOf relationships table shows additional CWE Catgeories and Views that reference this
weakness as a member. This information is often useful in understanding where a weakness fits
within the context of external information sources.
Nature Type ID Name Page
MemberOf 1396 Comprehensive Categorization: Access Control 1400 2519
References
[REF-938]Guillaume Ross. "Scheming for Privacy and Security". 2013 November 1. < https://
brooksreview.net/2013/11/guest-post_scheming-for-privacy-and-security/ >.2023-04-07.
CWE-940: Improper Verification of Source of a Communication Channel
Weakness ID : 940
Structure : Simple
Abstraction : Base
Description
The product establishes a communication channel to handle an incoming request that has been
initiated by an actor, but it does not properly verify that the request is coming from the expected
origin.
Extended Description
When an attacker can successfully establish a communication channel from an untrusted origin,
the attacker may be able to gain privileges and access unexpected functionality.
Relationships
CWE Version 4.14
CWE-940: Improper Verification of Source of a Communication Channel
CWE-940: Improper Verification of Source of a Communication Channel