Skills / Security testing and vulnerability assessment / The most common web weaknesses

Security testing and vulnerability assessment, lesson 3 of 8

The most common web weaknesses

The OWASP Top 10 is a widely used list of the most important web application security risks, published by the Open Worldwide Application Security Project. Learning these families gives you a map of where to look, and how to fix what you find.

Broken access control. Users can do or see things they should not, for example changing /invoice/1001 to /invoice/1002 in the address bar and seeing someone else's invoice. Fix: check permissions on the server for every request, never only by hiding buttons.

Injection. User input is treated as code, as in SQL injection, where input changes a database query. Fix: use parameterised queries, and validate input on the server.

Cross-site scripting (XSS). An attacker gets their script to run in other users' browsers, for example through a comment field that is shown without escaping. Fix: escape output by default, and use a content security policy.

Authentication failures. Weak passwords allowed, no limit on guesses, sessions that never expire. Fix: rate limiting, multi-factor authentication, secure session handling.

Security misconfiguration. Default passwords, detailed error messages shown to visitors, unnecessary features left switched on, cloud storage open to the public. Fix: hardened, reviewed configuration.

Vulnerable and outdated components. Old libraries and plugins with publicly known holes. Fix: an inventory of components, and regular updates.

Cryptographic failures. Sensitive data sent or stored without proper encryption, or passwords stored in a reversible form. Fix: HTTPS everywhere, strong password hashing.

Every finding you report should name the weakness, show the impact, and give a practical fix.

Try it: Try the security missions on this site that cover code review and SQL injection, then write a two-sentence description of the weakness and its fix in your own words.

Check yourself

1. Changing /invoice/1001 to /invoice/1002 shows another customer's invoice. Which weakness is this?

2. What is the main fix for SQL injection?

3. Why is hiding a button not enough to protect an admin feature?