Failure to Use Economy of Mechanism |
Weakness ID: 637 (Weakness Class) | Status: Draft |
Description Summary
Extended Description
Security mechanisms should be as simple as possible. Complex security mechanisms may engender partial implementations and compatibility problems, with resulting mismatches in assumptions and implemented security. A corollary of this principle is that data specifications should be as simple as possible, because complex data specifications result in complex validation code. Complex tasks and systems may also need to be guarded by complex security checks, so simple systems should be preferred.
Example 1
The IPSEC specification is complex, which resulted in bugs, partial implementations, and incompatibilities between vendors.
Example 2
HTTP Request Smuggling (CWE-444) attacks are feasible because there are not stringent requirements for how illegal or inconsistent HTTP headers should be handled. This can lead to inconsistent implementations in which a proxy or firewall interprets the same data stream as a different set of requests than the end points in that stream.
Reference | Description |
---|---|
CVE-2007-6067 | Support for complex regular expressions leads to a resultant algorithmic complexity weakness (CWE-407). |
CVE-2007-1552 | Either a filename extension and a Content-Type header could be used to infer the file type, but the developer only checks the Content-Type, enabling unrestricted file upload (CWE-434). |
CVE-2007-6479 | In Apache environments, a "filename.php.gif" can be redirected to the PHP interpreter instead of being sent as an image/gif directly to the user. Not knowing this, the developer only checks the last extension of a submitted filename, enabling arbitrary code execution. |
CVE-2005-2148 | The developer cleanses the $ REQUEST superglobal array, but PHP also populates $ GET, allowing attackers to bypass the protection mechanism and conduct SQL injection attacks against code that uses $ GET. |
Avoid complex security mechanisms when simpler ones would meet requirements. Avoid complex data models, and unnecessarily complex operations. Adopt architectures that provide guarantees, simplify understanding through elegance and abstraction, and that can be implemented similarly. Modularize, isolate and do not trust complex code, and apply other secure programming principles on these modules (e.g., least privilege) to mitigate vulnerabilities. |
Ordinality | Description |
---|---|
Primary | (where the weakness exists independent of other weaknesses) |
Nature | Type | ID | Name | View(s) this relationship pertains to![]() |
---|---|---|---|---|
ChildOf | ![]() | 657 | Violation of Secure Design Principles | Development Concepts (primary)699 Research Concepts (primary)1000 |
Since design issues are hard to fix, they are rarely publicly reported, so there are few CVE examples of this problem as of January 2008. Most publicly reported issues occur as the result of an implementation error instead of design, such as CVE-2005-3177 (failure to handle large numbers of resources) or CVE-2005-2969 (inadvertently disabling a verification step, leading to selection of a weaker protocol). |
Jerome H. Saltzer and Michael D. Schroeder. "The Protection of Information in Computer Systems". Proceedings of the IEEE 63. September, 1975. <http://web.mit.edu/Saltzer/www/publications/protection/>. |
Sean Barnum and Michael Gegick. "Economy of Mechanism". 2005-09-13. <https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/principles/348.html>. |
Submissions | ||||
---|---|---|---|---|
Submission Date | Submitter | Organization | Source | |
2008-01-18 | Pascal Meunier | Purdue University | External Submission | |
Modifications | ||||
Modification Date | Modifier | Organization | Source | |
2008-07-01 | Eric Dalci | Cigital | External | |
updated Time of Introduction | ||||
2008-09-08 | CWE Content Team | MITRE | Internal | |
updated Description, Relationships, Weakness Ordinalities | ||||
2009-01-12 | CWE Content Team | MITRE | Internal | |
updated Description, Name | ||||
Previous Entry Names | ||||
Change Date | Previous Entry Name | |||
2009-01-12 | Design Principle Violation: Not Using Economy of Mechanism | |||