This weakness occurs when software fails to properly follow the documented rules, protocols, or requirements of an external component it uses, such as a library, API, framework, or platform.
When your code calls an external function—like an API method, a library routine, or a system call—it must play by that component's rules. Ignoring required parameter formats, sequence of operations, state assumptions, or error handling protocols can cause the external component to behave in unexpected and insecure ways. This mismatch between expected and actual usage is the core of the vulnerability. For developers, this means carefully reading and adhering to the official specifications, SDK documentation, or API contracts for any external dependency. Assume that deviations, even if they seem to work during testing, can introduce subtle bugs, stability issues, or security gaps that attackers might exploit to bypass controls, crash the system, or access unauthorized data.
Impact: Quality DegradationVaries by Context