This weakness occurs when software behaves differently than its documented specifications, which can mislead users and create security risks.
When your code's actual behavior doesn't match its promised functionality, it creates a trust gap. Developers and systems relying on your published specs—like API contracts, security guarantees, or performance claims—will make incorrect assumptions. This mismatch often becomes the starting point for security vulnerabilities, as callers use the component in ways you didn't anticipate. To prevent this, treat your specifications as a critical part of your security design. Clearly document all behavioral nuances, edge cases, and security-relevant limitations. Actively test that your implementation aligns perfectly with this documentation, because even minor deviations can be exploited when attackers notice the gap between what you promise and what you actually deliver.
Impact: Quality Degradation
java
// Something that may throw an exception.* ...} catch (Throwable t) { ``` logger.error("Caught: " + t.toString()); return; }
java
// something that might throw IOException* ...} catch (IOException ioe) { ``` response.sendError(SC_NOT_FOUND); }