Owasp 2021 Ebook
Owasp 2021 Ebook
FOR 2021
EBOOK
INDEX
ONWASP Top Ten for 2021....................................................................4
OWASP is a nonprofit foundation that works to make software more secure and accessible. For nearly
two decades, OWASP has organized a community of tens of thousands of members with chapters
worldwide.
3
WHAT IS THE OWASP TOP TEN?
Before we jump straight into what’s new in the OWASP Top Ten 2021, you should first know about
the OWASP Top Ten.
One of OWASP’s most important goals is to help developers everywhere create more secure web
applications. They achieve this by constantly monitoring software security threats as they arise
and evaluating the threats based on their risk levels.
OWASP looks at all the security threats present online and ranks them according to the threat level
they pose. The top 10 risks make it to the OWASP Top Ten, a list of the ten most critical web application
security risks.
The OWASP Top 10 originally started in 2003 and has since grown over the years based on evolving
threats and feedback from the dev community. These days, the OWASP Top 10 serves as a pseudo-
standard for web application security worldwide.
OWASP released the latest version of the OWASP Top 10 on September 24, 2021.
The new version includes some significant structural changes from the last (2017) edition.
To summarize, OWASP has made the following three major changes to its Top 10 2021 list:
4
A01 BROKEN ACCESS CONTROL
PREVIOUS RANK: 5
CONSOLIDATED: NO
Jumping all the way to the top from fifth place back in 2017 is A01:2021-Broken Access Control.
Broken Access Control refers to a violation of the access control policy.
The access control policy typically enforces permissions that bind users to specific
actions at an access level.
However, attackers can sometimes bypass these policies, leading to unauthorized access.
The damage from unauthorized access depends on what an attacker chooses to do with sensitive data.
In most cases, attackers will disclose, modify, or even destroy vulnerable information. In other cases, an
attacker can also perform unauthorized business transactions outside their limits.
Common Vulnerabilities
• Insecure software API: Attackers can bypass insecure software API using HTTP methods for restful
services. These methods include missing access controls for the PUT, POST, and DELETE commands.
• Unrestricted URL access: When URLs are not adequately secured, attackers can bypass access
control checks through them. For example, an attack can modify URL parameters to authenticate
restricted pages as an unauthenticated user.
Sample Attack Scenario: URL Tampering
An attacker can use unauthenticated data in an SQL query to access account information:
pstmt.setString(1, request.getParameter(“acct”));
ResultSet results = pstmt.executeQuery( );
5
A02 CRYPTOGRAPHIC FAILURES
Previously referred to as Sensitive Data Exposure, Cryptographic Failures have been renamed to reflect the
root cause of this problem rather than a resulting symptom. In other words, Cryptographic Failures are what
can expose sensitive data.
Cryptographic systems protect sensitive data both in transit and at rest. Examples include passwords,
credit card numbers, and health records, just to name a few. Such data is often subject to data privacy laws,
such as the EU General Data Protection Regulation (GDPR).
Common Vulnerabilities
• Simple hash functions: Usually, cryptographic hash functions such as SHA-2 are required for
cryptographic systems, as they cannot be reversed. However, attackers can reverse engineer and
exploit cryptographic systems that use simple non-cryptographic, unsalted, or outdated hash
functions.
• Weak crypto keys: A weak key or key policy failure is often vulnerable to exploits. Examples include
devs leaving keys in source code repos that are publicly available or reusing previously exposed
crypto keys.
Sample Attack Scenario: Reverse Engineering Simple Hash Functions
Imagine a password database that uses simple hash functions. An attacker can download the password
database through a file upload weakness.
6
A03 INJECTION
PREVIOUS RANK: 1
CONSOLIDATED: YES; A07:2017-CROSS-SITE SCRIPTING (XSS)
Next up, we have A03:2021-Injection. Previously in the number one spot, the 2021 category of injection has
also consolidated to include A07:2017-Cross-Site Scripting (XSS). XSS is now a special case of injection.
Injection attacks are cyberattacks where attackers inject malicious code into a network. When the network
accesses a database, it also executes the injected code. The end result is usually that the attacker gains
access to the database. Examples of common injection attacks include SQL injection, Object Relational
Mapping (ORM), and Cross-Site Scripting (XSS).
Common Vulnerabilities
• Improper data handling: Any data that users input to the web application is not verified or filtered
by the web application. As a result, attackers can inject malicious code since there are no input
restrictions.
• Hostile data: The application uses hostile data in its codebase. An SQL command with dynamic queries
or object-relational mapping (ORM) with specific search parameters can both exploit this hostile data
and extract sensitive information.
Sample Attack Scenario: Hostile Data SQL Injection
If a web application uses hostile or untrusted data in its codebase, attackers can use an SQL injection
attack. For this example, we assume an SQL injection attack on the Northwind Database, a sample
database by Microsoft.
The following query is an example of SQL injection:
String query = “SELECT \* FROM CUSTOMERS WHERE CustomerID=’” + request.getParameter(“id”) + “’”;
7
A04 INSECURE DESIGN
Insecure Design is all about web application weaknesses that result from poor design practices, such as
ineffective control design. Note that Insecure Design is not the same as all other categories, as the other
categories are more about insecure implementation rather than insecure design.
This category is a fairly broad category that encompasses various vulnerabilities resulting from poor design
practices. As an example, consider a dev team that writes software without running a business risk profile.
Without a risk profile, the devs would not know how vulnerable the data they’re handling is and thus forget
to implement proper security checks.
Common Vulnerabilities
• Security requirements are poorly defined: The software engineering team does not properly identify
the functional and non-functional security requirements of the software.
• Poor business logic: The team does not properly identify the business logic of the software. included
here would be who will be using the software, how they will use it, and the nature of the data the
software will handle.
Sample Attack Scenario: Business Logic Exploit
Imagine a restaurant running a special promotion that gives group discounts on reservations of
ten or more people.
If the reservation software has no restrictions on the reservations, a single attacker can book all the seats
in the restaurant simultaneously. The attacker would only need a few requests to accomplish this.
8
A05 SECURITY MISCONFIGURATION
PREVIOUS RANK: 6
CONSOLIDATED: YES; A04:2017-XML External Entities (XXE)
Not only did OWASP bump up A05:2021-Security Misconfiguration to fifth place, but they also consolidated
it with A04:2017-XML External Entities (XXE).
Since OWASP also identified XXE as a specific case of Security Misconfiguration, the former is no longer a
separate category of its own.
Security misconfigurations are a result of not properly implementing security protocols in the web
application. By not following the best practices for security or not remaining vigilant, devs risk exposing
their software to cyberattacks.
Common Vulnerabilities
• Inappropriate security hardening: Devs can accidentally reveal stack traces to users or fail to
authorize cloud service access properly. Too many unnecessary features for the users provide more
room for attackers to find exploits.
• Improper security settings: Examples include outdated software, no security headers on the server,
and application frameworks using insecure values.
Sample Attack Scenario: Stack Trace Exploit
When devs don’t harden their applications properly, they risk revealing too much to the user. Savvy hackers
can use even a small piece of information to engineer an attack.
Consider an application server that has a poor configuration. The server accidentally displays
comprehensive error messages, which include information about the stack trace.
9
A06 VULNERABLE AND OUTDATED COMPONENTS*
The community survey identified Vulnerable and Outdated Components as #2 on their list of vulnerabilities.
The response alone should indicate how seriously devs everywhere take the threat of using vulnerable
software components.
It’s not just a case of A05:2021-Security Misconfiguration, but also a separate category of its own. As such,
A06 is a combination of both bad software design and poor implementation.
Common Vulnerabilities
• Using outdated or vulnerable software: The Operating System (OS), Database Management System
(DBMS), web server, APIs, etc., are not up-to-date or not considered secure.
• Poor version control: Devs use server-side or client-side components without knowing what version
they’re using. Also, devs do not test the compatibility of different software package libraries when they
update them.
Sample Attack Scenario: The Apache Struts Vulnerability
Apache Struts is an open-source web application development framework that is used by devs worldwide.
Researchers were able to uncover the CVE-2017-5638 vulnerability in this framework.
As a result of a code vulnerability in the Jakarta Multipart parser, attackers can run remote command
injection attacks by parsing an invalid HTTP content header.
10
A07 IDENTIFICATION AND AUTHENTICATION FAILURES
Previously known as Broken Authentication, A07 has expanded its scope to include a wide range of
Identification and Authentication Failures.
One of the most important tasks of a web application is to confirm and authenticate the identity of a user
logging into the software. That said, the application can sometimes fail to properly authenticate users,
opening the possibility of cyberattacks.
Common Vulnerabilities
• No login condition checks: It is easy to exploit software that does not have checks in place for users
logging in. For example, if the system has no limitations on the number of failed login attempts,
hackers can brute-force their way into an account or use credential stuffing.
• Poor session handling: Poorly written software will either expose the session identifier in the URL
or reuse a session identifier from a successful login session.
Sample Attack Scenario: 2014 iCloud Leaks
In 2014, a collection of personal photographs of popular Hollywood celebrities was leaked online.
The attackers managed to obtain the photographs through iCloud. Attackers were able to use a
combination of phishing and brute-force guessing to hack into the celebrity accounts.
11
A08 SOFTWARE AND DATA INTEGRITY FAILURES
Software and data integrity failures arise when the integrity of the software code or infrastructure
is violated.
This category targets assumptions related to updating software, CI/CD, or new modules without
checking their integrity first.
Common Vulnerabilities
• Using untrusted sources: Getting code from untrusted repositories, libraries, or Content Delivery
Networks (CDNs) can lead to vulnerabilities in the software that attackers can exploit.
• Auto-update functionality: While developers can benefit from auto-updates most of the time,
they are also a potential security risk. Sometimes, the update can include vulnerable code.
Sample Attack Scenario: SolarWinds Update
The SolarWinds malicious software update was one of the largest data integrity failures in history.
Attackers were able to bypass security checks from SolarWinds, a software development IT company,
and distribute malicious updates to over 18,000 organizations that used the company’s services.
As a result of this data integrity failure, companies suffered massive losses to their revenue and
business operations.
12
A09 SECURITY LOGGING AND MONITORING FAILURES*
It’s one thing to prevent security breaches. It’s another problem entirely to adequately monitor and contain
them when they happen.
A09 is all about detecting and responding to security breaches. When IT and network admins fail to
detect breaches, they cannot contain the breach in time and risk damaging the software even more.
A secure logging and monitoring protocol is therefore needed to minimize the damage from
security breaches.
Common Vulnerabilities
• Improper log handling: When a company fails to monitor application and API logs frequently, it will fail
to detect suspicious activity and breaches. Another problem is when the system only stores logs locally,
therefore restricting access.
• Poor log design: Even if a company frequently monitors logs, the logs are not helpful if they do not
track major network events such as multiple failed login attempts.
Sample Attack Scenario: Improper Log Handling
A hospital uses a software management system. Attackers were able to successfully breach the system,
modify patients’ personal health records, and extract their data.
However, a lack of log monitoring resulted in the breach going undetected until it was too late. Without
13
A10 SERVER SIDE REQUEST FORGERY (SSRF)*
SSRF ranked first in the OWASP community survey. This category deals with web applications that fetch
remote resources without first verifying the URL. Attackers can therefore forge user-supplied URLs to
launch cyberattacks.
Unfortunately, SSRF attacks are now becoming more prevalent. That said, as long as you know the threat
that SSRFs pose, you can protect your software against them.
Common Vulnerabilities:
• URL Inconsistency: Attackers can use inconsistent URLs to launch attacks such as DNS rebinding.
• Poor firewall policies: The software’s firewall allows most remote traffic through, allowing attackers
to break in.
Sample Attack Scenario: Access Local Files
An attacker can use the following commands to access local files on the software’s network:
file:///etc/passwd</span>
http://localhost:28017/.
Prevention Measures:
• Disable HTTP Redirections: By disabling HTTP redirections, you can prevent SSRF attacks
through malicious URL requests.
14
FINAL THOUGHTS
As more people start using web applications worldwide, the number of cyberattacks and severity
of security risks will only increase. Cloud application security is an ever-increasing critical aspect
of application development.
Fortunately, there is a way you can protect your software against the Top 10 vulnerabilities of 2021:
with the help of Kiuwan application security solutions.
Kiuwan offers two solutions that can help you build more secure web applications today: Static
Application Security Testing (SAST) and SCA insights.
SAST is an automatic code scanning tool that scans your code for security vulnerabilities, design
weaknesses, or other potential exploits. The entire process takes minutes on your local machine,
and you can share your scan results on the cloud once you’re done.
What’s more, you can use SAST to build a customized action plan to prepare your web application
against different cyberattack scenarios and optimize your response to them.
Additionally, Kiuwan’s SCA Insights also helps you manage the open-source risk of your software.
The more you use third-party components in your software, the greater your risk of exploits.
That’s why SCA Insights uses open source code validation to identify code components, detect
threats, and avoid obsolescence.
The best part? Kiuwan’s products are fully compliant with IT security standards,
including CERT, NIST and OWASP.
contact@kiuwan.com
Partnerships: partners@kiuwan.com
15