DEV Community

Nargiz Naghiyeva
Nargiz Naghiyeva

Posted on

3 Most Common CWE Examples

When a scanner shows you hundreds of code errors, you should sort them by real business risk, not alphabetically, to save time.

3 Most Common CWE Examples
CWE-89: SQL Injection (SQLi): User input is passed to the database without validation. The hacker can bypass the login page, steal or delete the entire customer database.
CWE-79: Cross-Site Scripting (XSS): Malicious JavaScript code that is not cleaned up is placed on the website. The hacker hijacks the profiles of other users.
CWE-22: Path Traversal: Due to a vulnerability in the code, the hacker infiltrates the server's internal system directories, reads hidden configuration files and passwords.

Where the bug is found is critical:
Is it exposed to the Internet? An SQL injection in the main entrance of the site should be closed immediately. But the status of the same bug in an internal, isolated test panel can wait a little longer.
Is the data sensitive? Always prioritize CWEs in code sections that work with payment systems and user passwords.

Automate the Process
Break the Pipeline (Break the Build): If a new code written by a programmer contains a vulnerability that is on the list of the most dangerous bugs in the world (CWE Top 25), the CI/CD system should automatically block the code from going live.
Security Debt: You can record low-risk bugs and easily resolve them during the next routine maintenance cycle.

Top comments (0)