Improper Verification of Source of a Communication Channel
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.
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.
The following examples help to illustrate the nature of this weakness and describe methods or techniques which can be used to mitigate the risk.
Note that the examples here are by no means exhaustive and any given weakness may have many subtle varieties, each of which may require different detection methods or runtime controls.
This Android application will remove a user account when it receives an intent to do so:
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.
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.
Weaknesses in this category are related to access control.
Weaknesses in this category are related to the A07 category "Identification and Authentication Failures" in the OWASP Top Ten 2021.
Weaknesses in this category are related to the design and architecture of a system's identification management components. Frequently these deal with verifying that ex...
This view (slice) covers all the elements in CWE.
CWE entries in this view (slice) are often seen in mobile applications.
This view (slice) lists weaknesses that can be introduced during implementation.