{"@ID": "940", "@Name": "Improper Verification of Source of a Communication Channel", "@Abstraction": "Base", "@Structure": "Simple", "@Status": "Incomplete", "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.", "Related_Weaknesses": {"Related_Weakness": [{"@Nature": "ChildOf", "@CWE_ID": "923", "@View_ID": "1000", "@Ordinal": "Primary"}, {"@Nature": "ChildOf", "@CWE_ID": "346", "@View_ID": "1000"}]}, "Weakness_Ordinalities": {"Weakness_Ordinality": {"Ordinality": "Primary"}}, "Applicable_Platforms": {"Language": {"@Class": "Not Language-Specific", "@Prevalence": "Undetermined"}, "Technology": {"@Class": "Mobile", "@Prevalence": "Undetermined"}}, "Modes_Of_Introduction": {"Introduction": [{"Phase": "Architecture and Design"}, {"Phase": "Implementation", "Note": "REALIZATION: This weakness is caused during implementation of an architectural security tactic."}]}, "Common_Consequences": {"Consequence": {"Scope": ["Access Control", "Other"], "Impact": ["Gain Privileges or Assume Identity", "Varies by Context", "Bypass Protection Mechanism"], "Note": "An attacker can access any functionality that is inadvertently accessible to the source."}}, "Potential_Mitigations": {"Mitigation": {"Phase": "Architecture and Design", "Description": {"xhtml:p": ["Use a mechanism that can validate the identity of the source, such as a certificate, and validate the integrity of data to ensure that it cannot be modified in transit using an Adversary-in-the-Middle (AITM) attack.", "When designing functionality of actions in the URL scheme, consider whether the action should be accessible to all mobile applications, or if an allowlist of applications to interface with is appropriate."]}}}, "Demonstrative_Examples": {"Demonstrative_Example": [{"@Demonstrative_Example_ID": "DX-112", "Intro_Text": "This Android application will remove a user account when it receives an intent to do so:", "Example_Code": {"@Nature": "Bad", "@Language": "Java", "xhtml:div": {"xhtml:br": [null, null, null, null], "xhtml:div": {"@style": "margin-left:1em;", "xhtml:br": null, "xhtml:div": {"@style": "margin-left:1em;", "xhtml:br": null, "#text": "int userID = intent.getIntExtra(\"userID\");destroyUserData(userID);"}, "#text": "@Overridepublic void onReceive(Context context, Intent intent) {}"}, "#text": "IntentFilter filter = new IntentFilter(\"com.example.RemoveUser\");MyReceiver receiver = new MyReceiver();registerReceiver(receiver, filter);\n                     public class DeleteReceiver extends BroadcastReceiver {}"}}, "Body_Text": "This application does not check the origin of the intent, thus allowing any malicious application to remove a user. Always check the origin of an intent, or create an allowlist of trusted applications using the manifest.xml file."}, {"@Demonstrative_Example_ID": "DX-109", "Intro_Text": "These Android and iOS applications intercept URL loading within a WebView and perform special actions if a particular URL scheme is used, thus allowing the Javascript within the WebView to communicate with the application:", "Example_Code": [{"@Nature": "Bad", "@Language": "Java", "xhtml:div": {"xhtml:i": "// Android", "xhtml:br": [null, null], "xhtml:div": {"@style": "margin-left:1em;", "xhtml:div": {"xhtml:div": {"@style": "margin-left:1em;", "xhtml:div": [{"@style": "margin-left:1em;", "xhtml:br": null, "#text": "writeDataToView(view, UserData);return false;"}, {"@style": "margin-left:1em;", "#text": "return true;"}], "xhtml:br": null, "#text": "if(url.substring(14,25).equalsIgnoreCase(\"getUserInfo\")){}else{}"}, "#text": "if (url.substring(0,14).equalsIgnoreCase(\"examplescheme:\")){}"}}, "#text": "@Overridepublic boolean shouldOverrideUrlLoading(WebView view, String url){}"}}, {"@Nature": "Bad", "@Language": "Objective-C", "xhtml:div": {"xhtml:i": "// iOS", "xhtml:br": [null, null], "xhtml:div": {"@style": "margin-left:1em;", "xhtml:div": {"xhtml:br": [null, null, null], "xhtml:div": {"@style": "margin-left:1em;", "xhtml:div": {"xhtml:br": [null, null, null], "xhtml:div": {"@style": "margin-left:1em;", "xhtml:div": {"xhtml:br": [null, null], "xhtml:i": "// Make data available back in webview.", "#text": "UIWebView *webView = [self writeDataToView:[URL query]];"}}, "#text": "NSString *functionString = [URL resourceSpecifier];if ([functionString hasPrefix:@\"specialFunction\"]){}return NO;"}}, "#text": "NSURL *URL = [exRequest URL];if ([[URL scheme] isEqualToString:@\"exampleScheme\"]){}return YES;"}}, "#text": "-(BOOL) webView:(UIWebView *)exWebView shouldStartLoadWithRequest:(NSURLRequest *)exRequest navigationType:(UIWebViewNavigationType)exNavigationType{}"}}, {"@Nature": "Attack", "@Language": "JavaScript", "xhtml:div": "window.location = examplescheme://method?parameter=value"}], "Body_Text": ["A call into native code can then be initiated by passing parameters within the URL:", "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": {"Observed_Example": [{"Reference": "CVE-2025-3651", "Description": "desktop product does not properly verify the source of a communication channel, allowing command execution", "Link": "https://www.cve.org/CVERecord?id=CVE-2025-3651"}, {"Reference": "CVE-2000-1218", "Description": "DNS server can accept DNS updates from hosts that it did not query, leading to cache poisoning", "Link": "https://www.cve.org/CVERecord?id=CVE-2000-1218"}, {"Reference": "CVE-2005-0877", "Description": "DNS server can accept DNS updates from hosts that it did not query, leading to cache poisoning", "Link": "https://www.cve.org/CVERecord?id=CVE-2005-0877"}, {"Reference": "CVE-2001-1452", "Description": "DNS server caches glue records received from non-delegated name servers", "Link": "https://www.cve.org/CVERecord?id=CVE-2001-1452"}]}, "Related_Attack_Patterns": {"Related_Attack_Pattern": [{"@CAPEC_ID": "500"}, {"@CAPEC_ID": "594"}, {"@CAPEC_ID": "595"}, {"@CAPEC_ID": "596"}]}, "References": {"Reference": {"@External_Reference_ID": "REF-324"}}, "Mapping_Notes": {"Usage": "Allowed", "Rationale": "This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.", "Comments": "Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.", "Reasons": {"Reason": {"@Type": "Acceptable-Use"}}}, "Notes": {"Note": {"@Type": "Relationship", "#text": "While many access control issues involve authenticating the user, this weakness is more about authenticating the actual source of the communication channel itself; there might not be any \"user\" in such cases."}}, "Content_History": {"Submission": {"Submission_Name": "CWE Content Team", "Submission_Organization": "MITRE", "Submission_Date": "2014-02-13", "Submission_Version": "2.6", "Submission_ReleaseDate": "2014-02-19"}, "Modification": [{"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2017-11-08", "Modification_Version": "3.0", "Modification_ReleaseDate": "2017-11-08", "Modification_Comment": "updated Modes_of_Introduction, References, Relationships"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2019-06-20", "Modification_Version": "3.3", "Modification_ReleaseDate": "2019-06-20", "Modification_Comment": "updated Related_Attack_Patterns"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2020-02-24", "Modification_Version": "4.0", "Modification_ReleaseDate": "2020-02-24", "Modification_Comment": "updated Applicable_Platforms, Potential_Mitigations, Relationships"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2020-06-25", "Modification_Version": "4.1", "Modification_ReleaseDate": "2020-06-25", "Modification_Comment": "updated Demonstrative_Examples, Potential_Mitigations"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2021-07-20", "Modification_Version": "4.5", "Modification_ReleaseDate": "2021-07-20", "Modification_Comment": "updated Potential_Mitigations"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2021-10-28", "Modification_Version": "4.6", "Modification_ReleaseDate": "2021-10-28", "Modification_Comment": "updated Relationships"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2022-10-13", "Modification_Version": "4.9", "Modification_ReleaseDate": "2022-10-13", "Modification_Comment": "updated Relationships"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2023-01-31", "Modification_Version": "4.10", "Modification_ReleaseDate": "2023-01-31", "Modification_Comment": "updated Description, Related_Attack_Patterns"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2023-04-27", "Modification_Version": "4.11", "Modification_ReleaseDate": "2023-04-27", "Modification_Comment": "updated Relationships"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2023-06-29", "Modification_Version": "4.12", "Modification_ReleaseDate": "2023-06-29", "Modification_Comment": "updated Mapping_Notes, Relationships"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2024-11-19", "Modification_Version": "4.16", "Modification_ReleaseDate": "2024-11-19", "Modification_Comment": "updated References"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2025-12-11", "Modification_Version": "4.19", "Modification_ReleaseDate": "2025-12-11", "Modification_Comment": "updated Common_Consequences, Relationships, Weakness_Ordinalities"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2026-04-30", "Modification_Version": "4.20", "Modification_ReleaseDate": "2026-04-30", "Modification_Comment": "updated Observed_Examples"}]}}
