Top 25 Software Programming Errors

 

MITRE Corp. and The SANS Institute, participants in what’s called the Common Weakness Enumeration (CWE) project organized by the U.S. Department of Homeland Security’s National Cybersecurity Division, have come out with a list of Top 25 Programming Errors in Software.

 

The Top 25 is organized into three high-level categories.

 

Category 1 – Insecure Interaction Between Components

 

These weaknesses are related to insecure ways in which data is sent and received between separate components, modules, programs, processes, threads, or systems.

 

1) Improper Input Validation
2) Improper Encoding or Escaping of Output
3) Failure to Preserve SQL Query Structure (aka ‘SQL Injection’)
4) Failure to Preserve Web Page Structure (aka ‘Cross-site Scripting’)
5) Failure to Preserve OS Command Structure (aka ‘OS Command Injection’)
6) Cleartext Transmission of Sensitive Information
7) Cross-Site Request Forgery (CSRF)
8 )  Race Condition
9) Error Message Information Leak

 

Category 2 – Risky Resource Management

 

The weaknesses in this category are related to ways in which software does not properly manage the creation, usage, transfer, or destruction of important system resources.

 

10) Failure to Constrain Operations within the Bounds of a Memory Buffer
11) External Control of Critical State Data
12) External Control of File Name or Path
13) Untrusted Search Path
14) Failure to Control Generation of Code (aka ‘Code Injection’)
15) Download of Code Without Integrity Check
16) Improper Resource Shutdown or Release
17) Improper Initialization
18) Incorrect Calculation

 

Category 3 – Porous Defenses

 

The weaknesses in this category are related to defensive techniques that are often misused, abused, or just plain ignored.

 

19) Improper Access Control (Authorization)
20) Use of a Broken or Risky Cryptographic Algorithm
21) Hard-Coded Password
22) Insecure Permission Assignment for Critical Resource
23) Use of Insufficiently Random Values
24) Execution with Unnecessary Privileges
25) Client-Side Enforcement of Server-Side Security

 

To read more about how these Top 25 errors were shortlisted and what each of these means, visit the official listing page at https://cwe.mitre.org/top25/.