{"id":683,"date":"2009-02-28T10:20:23","date_gmt":"2009-02-28T15:20:23","guid":{"rendered":"http:\/\/www.coresecuritypatterns.com\/blogs\/?p=683"},"modified":"2020-08-08T03:46:24","modified_gmt":"2020-08-08T03:46:24","slug":"top-25-most-dangerous-programming-errors","status":"publish","type":"post","link":"https:\/\/websecuritypatterns.com\/blogs\/2009\/02\/28\/top-25-most-dangerous-programming-errors\/","title":{"rendered":"Top 25 Most Dangerous Programming Errors"},"content":{"rendered":"<p><a href=\"http:\/\/cwe.mitre.org\/top25\/\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft\" src=\"http:\/\/cwe.mitre.org\/images\/cwebanner.jpg\" alt=\"\" width=\"364\" height=\"33\"><\/a>Few weeks ago, US Dept. of Homeland security (National Cyber Security Division) in collaboration with SANS Institute\/MITRE teams worked together and released a list of 25 dangerous programming errors as common security flaws, which opens doors for easy exploitation. My first look at this list, I thought it is a old wine in a new bottle as the document sounded a bit more high-level without applied countermeasures and reality checks. The list did go extra mile highlighting the mitigation strategies and countermeasures. For those follow <a href=\"http:\/\/www.owasp.org\/index.php\/Top_10_2007\">OWASP Top 10 (Most compelling)<\/a>, the CWE Top 25 list is a bit more augmented to include the weakest links of security in target resource and client\/server environment. At the outset, the Top 25 list certainly helps our budding developers on understanding the potential weaknesses and vulnerabilities arise due to poor coding practices.<\/p>\n<p>Here is the list of <a href=\"http:\/\/cwe.mitre.org\/top25\/\" target=\"_blank\" rel=\"noopener noreferrer\">SANS\/MITRE&#8217;s Top 25 Most Dangerous Programming Errors<\/a>, in no particular order&#8230;<\/p>\n<p>1. Improper Input Validation<br \/>\n2. Improper Encoding or Escaping of Output<br \/>\n3. Failure to Preserve SQL Query Structure (SQL Injection)<br \/>\n4. Failure to Preserve Web Page Structure (Cross-site Scripting)<br \/>\n5. Failure to Preserve OS Command Structure (OS Command Injection)<br \/>\n6. Cleartext Transmission of Sensitive Information<br \/>\n7. Cross-Site Request Forgery (CSRF)<br \/>\n8. Race Condition<br \/>\n9. Error Message Information Leak<br \/>\n10. Failure to Constrain Operations within the Bounds of a Memory Buffer<br \/>\n11. External Control of Critical State Data<br \/>\n12. External Control of File Name or Path<br \/>\n13. Untrusted Search Path<br \/>\n14. Failure to Control Generation of Code (Code Injection)<br \/>\n15. Download of Code Without Integrity Check<br \/>\n16. Improper Resource Shutdown or Release<br \/>\n17. Improper Initialization<br \/>\n18. Incorrect Calculation<br \/>\n19. Improper Access Control (Authorization)<br \/>\n20. Use of a Broken or Risky Cryptographic Algorithm<br \/>\n21. Hard-Coded Password<br \/>\n22. Insecure Permission Assignment for Critical Resource<br \/>\n23. Use of Insufficiently Random Values<br \/>\n24. Execution with Unnecessary Privileges<br \/>\n25. Client-Side Enforcement of Server-Side Security<\/p>\n<p><a href=\"http:\/\/www.websecuritypatterns.com\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft\" src=\"http:\/\/www.websecuritypatterns.com\/images\/csp.jpg\" alt=\"\" width=\"62\" height=\"103\"><\/a>It is an impressive list&#8230;that leaves me with some hard questions, when it comes to how to implement the required safeguards and countermeasures &#8211; <em>Yes, the <strong>Devil is always in the Implementation details<\/strong><\/em> as there is <em><strong>No Magic Silver Bullet<\/strong><\/em> and it becomes critical to the developer to choose, adopt and practice the appropriate &#8220;Security Design and Best Practices&#8221; that identifies the safeguard and helps proactively defend against those known errors.&nbsp; As a developer &#8211; in the first place you must understand &#8211; how to bake-in security in your application choosing the relevant &#8220;Security patterns, Best practices, Pitfalls and Reality checks&#8221;&#8230;for your target application development and deployment environment.<\/p>\n<p>This gives me another opportunity for <a title=\"Core Security Patterns\" href=\"http:\/\/www.websecuritypatterns.com\" target=\"_blank\" rel=\"noopener noreferrer\">my shameless book promotion (is here)<\/a>, especially for those who is interested in knowing the security patterns and require implementation guidance for securing Java\/J2EE\/Web Services environments.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Few weeks ago, US Dept. of Homeland security (National Cyber Security Division) in collaboration with SANS Institute\/MITRE teams worked together and released a list of 25 dangerous programming errors as common security flaws, which opens doors for easy exploitation. My first look at this list, I thought it is a old wine in a new bottle as the document sounded&#8230; <a href=\"https:\/\/websecuritypatterns.com\/blogs\/2009\/02\/28\/top-25-most-dangerous-programming-errors\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[20,21,6,9],"tags":[36,37,40,52,53,62,76],"class_list":["post-683","post","type-post","status-publish","format-standard","hentry","category-java-ee","category-java-security","category-main","category-security","tag-inputvalidation","tag-j2ee","tag-java-security","tag-owasp","tag-patterns","tag-security","tag-xss"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/websecuritypatterns.com\/blogs\/wp-json\/wp\/v2\/posts\/683","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/websecuritypatterns.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/websecuritypatterns.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/websecuritypatterns.com\/blogs\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/websecuritypatterns.com\/blogs\/wp-json\/wp\/v2\/comments?post=683"}],"version-history":[{"count":1,"href":"https:\/\/websecuritypatterns.com\/blogs\/wp-json\/wp\/v2\/posts\/683\/revisions"}],"predecessor-version":[{"id":2827,"href":"https:\/\/websecuritypatterns.com\/blogs\/wp-json\/wp\/v2\/posts\/683\/revisions\/2827"}],"wp:attachment":[{"href":"https:\/\/websecuritypatterns.com\/blogs\/wp-json\/wp\/v2\/media?parent=683"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/websecuritypatterns.com\/blogs\/wp-json\/wp\/v2\/categories?post=683"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/websecuritypatterns.com\/blogs\/wp-json\/wp\/v2\/tags?post=683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}