CWE-940 is a weakness category for improper verification of the source of a communication channel. It applies when software accepts messages or data without reliably confirming which process or system sent them. A value supplied with a message, such as a window handle, may identify a destination or provide a clue, but it is not proof of the sender’s identity.
This weakness matters when applications use incoming messages to make security decisions, especially across privilege boundaries. In Windows inter-process communication, for example, a program that trusts a caller-controlled field instead of authenticating the actual sender may accept forged requests. Defenses include verifying the peer through a trusted operating-system mechanism, restricting permitted actions, and treating message contents as untrusted. CWE-940 describes the weakness class; it does not by itself establish that a particular product or attack is affected.


