The OWASP Top 10 provides a standardized catalog of the most critical security risks to web applications. Compiled by a global community of security experts, this influential document highlights the most prevalent vulnerabilities that organizations must address. To mitigate these risks effectively, OWASP encourages widespread adoption of the Top 10 as a foundational element of secure software development lifecycle (SDLC) practices. Below are the security risks reported in the OWASP 2021 report.
These are the top categories in the OWASP-2021 report, you can gain some in-depth knowledge of these categories.
Access control is a security mechanism that restricts user actions to authorized boundaries. Enforcing granular permissions safeguards sensitive information from unauthorized disclosure, modification, or destruction. Access control failures can lead to data breaches, privilege escalation, and business process compromises. Common access control vulnerabilities include:
Scenario #1: The application uses unverified data in a SQL query to access account information.
pstmt.setString(1, request.getParameter("acct"));ResultSet results = pstmt.executeQuery( );
An attacker can modify the browser’s ‘acct’ parameter to submit any account number. Without proper verification, this allows access to any user’s account.
https://example.com/app/accountInfo?acct=notmyacct
Scenario #2: An attacker attempts to forcefully browse to target URLs. Admin rights are required to access the admin page.
https://example.com/app/admin_getappInfo
If an unauthenticated user can access either page, it’s a security flaw. If a non-admin can access the admin page, it also indicates a flaw.
Reference: https://owasp.org/Top10/A01_2021-Broken_Access_Control/
The initial step in data protection is to assess the sensitivity of information both at rest and in transit. Data categories such as passwords, financial data, personal identifiable information (PII), and trade secrets demand heightened security measures, especially when subject to stringent regulatory frameworks like the General Data Protection Regulation (GDPR) or the Payment Card Industry Data Security Standard (PCI DSS).
Scenario 1: Encryption Inconsistency Despite database encryption, sensitive data like credit card numbers may be exposed through vulnerabilities like SQL injection if decrypted prematurely during application retrieval. This highlights the importance of end-to-end encryption.
Scenario 2: Weak Transport Layer Security (TLS) A lack of robust TLS implementation can leave applications susceptible to man-in-the-middle attacks. By intercepting unencrypted traffic, adversaries can steal session cookies, hijack user sessions, and manipulate data in transit, potentially leading to unauthorized access or financial loss.
Reference: https://owasp.org/Top10/A02_2021-Cryptographic_Failures/
Injection is a broad category of security vulnerabilities that occur when untrusted data is sent to an interpreter as part of a command or query. The interpreter then processes the input without proper validation, leading to unintended consequences such as data loss, system compromise, or denial of service.
While the core principle of injection attacks remains consistent, they manifest in various forms depending on the target system or application:
1. SQL Injection: Exploits vulnerabilities in SQL databases by injecting malicious SQL statements.
2. OS Command Injection: Allows attackers to execute operating system commands through the application.
3. LDAP Injection: Targets Lightweight Directory Access Protocol (LDAP) servers by injecting malicious LDAP queries.
4. XML Injection: Exploits vulnerabilities in XML processors by injecting malicious XML content.
5. NoSQL Injection: Targets NoSQL databases by injecting malicious queries.
Scenario #1: The application constructs the following vulnerable SQL query using untrusted data:
String query = "SELECT \* FROM accounts WHERE custID='" + request.getParameter("id") + "'";
Scenario #2: Similarly, an application’s blind trust in frameworks can lead to queries that remain vulnerable, such as those written in Hibernate Query Language (HQL):
Query HQLQuery = session.createQuery("FROM accounts WHERE custID='" + request.getParameter("id") + "'");
In both scenarios, the attacker alters the ‘id’ parameter in their browser to send: ‘ UNION SLEEP(10);–.
This modification changes the intent of both queries, causing them to return all records from the accounts table. More severe attacks could involve modifying or deleting data, or even executing stored procedures.
Reference: https://owasp.org/Top10/A03_2021-Injection/
Insecure design refers to fundamental flaws in a system’s architecture, characterized by missing or ineffective security controls. Unlike insecure implementation, which involves errors in executing a design, insecure design stems from inadequate risk profiling and fails to address specific attack vectors. Even a flawless implementation cannot fix an insecure design, as essential security controls were never established.
Insecure design is about neglecting security as a first-class citizen in the development process. It manifests in various ways:
Scenario #1: A credential recovery process that relies on “questions and answers” is not compliant with NIST 800-63b, the OWASP ASVS, or the OWASP Top 10. These methods are unreliable for verifying identity because multiple individuals could potentially know the answers. This approach should be removed and replaced with a more secure design.
Scenario #2: A cinema chain offers group booking discounts and requires a deposit for bookings exceeding fifteen attendees. Attackers could exploit this system by threat modeling the process to book six hundred seats across all cinemas in just a few requests, potentially resulting in significant financial loss.
Reference: https://owasp.org/Top10/A04_2021-Insecure_Design/
Security misconfiguration is a broad category of vulnerabilities that arise from improper configuration of system hardware, software, and applications. Essentially, it’s like leaving a door unlocked or a window open, inviting unauthorized access. Misconfiguration can manifest in various forms across different IT components.
Network Devices: Issues include incorrect firewall rules, open ports, weak authentication, and improper network segmentation.
Servers: Problems arise from default configurations, weak passwords, missing patches, permissive file permissions, and insecure services.
Databases: Vulnerabilities include default credentials, weak encryption, exposed management interfaces, and excessive database privileges.
Applications: Security risks stem from insecure default settings, improper error handling, missing input validation, and weak session management.
Cloud Services: Challenges include incorrect access controls, misconfigured storage bucket permissions, network security group misconfigurations, and data exposure.
Scenario #1: The application server includes sample applications that were not removed from the production environment. These sample applications contain known security vulnerabilities that attackers can exploit. For example, if one of these applications is an admin console with unchanged default accounts, an attacker can log in using default passwords and gain control.
Scenario #2: Directory listing is enabled on the server. An attacker can easily list directories and discover the compiled Java classes. By downloading and decompiling these classes, the attacker reverse engineers the code and identifies a critical access control flaw in the application.
Reference: https://owasp.org/Top10/A05_2021-Security_Misconfiguration/
Vulnerable and outdated components refer to third-party software, libraries, or frameworks used within an application that contain known security vulnerabilities or are no longer supported by their developers. These components can be either open-source or proprietary.
Modern applications are increasingly composed of a complex web of interconnected components. This ecosystem includes:
Each of these components may have dependencies on other components, creating a complex dependency tree.
Scenario #1: Component Privileges and Vulnerabilities
Components typically run with the same privileges as the application itself, so flaws in any component can lead to significant security impacts. These flaws can be accidental, such as coding errors, or intentional, such as backdoors embedded in a component. Some examples of exploitable component vulnerabilities include:
Patching is crucial for all systems, including Internet of Things (IoT) devices, which are often difficult or impossible to update. The importance of patching IoT devices, such as biomedical equipment, cannot be overstated.
Attackers often use automated tools to locate unpatched or misconfigured systems. For instance, the Shodan IoT search engine can identify devices still vulnerable to the Heartbleed bug, which was patched in April 2014.
Reference: https://owasp.org/Top10/A06_2021-Vulnerable_and_Outdated_Components/
Identification and authentication failures occur when a system or application is unable to accurately verify a user’s identity, leading to unauthorized access. This fundamental security lapse can have severe consequences for organizations.
Both processes are crucial for maintaining system security. A failure in either can lead to breaches.
Scenario #1: Credential stuffing, which involves using lists of known passwords, is a prevalent attack method. If an application lacks automated protection against such attacks, it can be exploited as a password oracle to verify the validity of credentials.
Scenario #2: Many authentication attacks result from relying solely on passwords. While password rotation and complexity requirements were once considered best practices, they often lead to the use of weak or reused passwords. Organizations should follow NIST 800-63 guidelines and transition to multi-factor authentication to enhance security.
Reference: https://owasp.org/Top10/A07_2021-Identification_and_Authentication_Failures/
Software and data integrity failures occur when code and infrastructure do not protect against integrity violations. Examples include relying on plugins, libraries, or modules from untrusted sources and having an insecure CI/CD pipeline that allows unauthorized access or malicious code. Auto-update functionalities without integrity verification pose risks, as attackers can distribute malicious updates. Additionally, insecure deserialization, where data structures are exposed and modifiable by attackers, can lead to vulnerabilities.
Software Integrity: Refers to the assurance that software functions as intended and has not been tampered with or maliciously modified.
Data Integrity: Ensures that data remains accurate and complete throughout its lifecycle, preventing unauthorized modifications or deletions.
Scenario #1: Update without Signing: Many home routers, set-top boxes, and device firmware do not verify updates through signed firmware. Unsigned firmware presents a growing security risk and is increasingly targeted by attackers. This issue is critical because there is often no immediate remediation other than addressing it in future updates and waiting for older versions to be phased out.
Scenario #2: SolarWinds Malicious Update: Nation-states have targeted update mechanisms, as demonstrated by the SolarWinds Orion attack. Despite having secure build and update integrity processes, SolarWinds’ system was compromised. For several months, the company unknowingly distributed a highly targeted malicious update to over 18,000 organizations, affecting approximately 100. This incident represents one of the most extensive and significant breaches of its kind.
Reference: https://owasp.org/Top10/A08_2021-Software_and_Data_Integrity_Failures/
Security logging and monitoring failures occur when systems or applications fail to adequately record or analyze security-relevant events, hindering the ability to detect, investigate, and respond to threats. This often results in delayed incident discovery, compromised incident response, and increased risk exposure.
Scenario #1: A children’s health plan provider’s website suffered a breach that went undetected due to insufficient monitoring and logging. An external party alerted the provider that an attacker had accessed and altered thousands of sensitive health records for over 3.5 million children. A post-incident review revealed that significant vulnerabilities had been overlooked by the website developers. With no logging or monitoring in place, the breach could have been ongoing since 2013, spanning over seven years.
Scenario #2: A major Indian airline experienced a data breach involving more than a decade’s worth of personal data for millions of passengers, including passport and credit card information. The breach occurred at a third-party cloud hosting provider, which eventually notified the airline of the incident after a delay.
Reference:https://owasp.org/Top10/A09_2021-Security_Logging_and_Monitoring_Failures/
Server-Side Request Forgery (SSRF) vulnerabilities occur when a web application retrieves a remote resource without validating the user-provided URL.This flaw allows attackers to manipulate the application into sending requests to unintended destinations, bypassing protections such as firewalls, VPNs, or network access control lists (ACLs).
As modern web applications increasingly offer features that involve fetching URLs, SSRF incidents are becoming more common. The severity of SSRF is also escalating due to the prevalence of cloud services and the growing complexity of application architectures.
Scenario #1: Port Scanning Internal Servers: In a network with no segmentation, attackers can map internal networks and determine open or closed ports on internal servers by analyzing connection results or the time taken to connect or reject SSRF payload connections.
Scenario #2: Sensitive Data Exposure: Attackers may exploit SSRF vulnerabilities to access local files or internal services, potentially exposing sensitive information such as file:///etc/passwd and http://localhost:28017/.
Scenario #3: Accessing Cloud Service Metadata Storage: Many cloud providers have metadata storage accessible at addresses like http://169.254.169.254/. Attackers can read this metadata to obtain sensitive information.
Reference: https://owasp.org/Top10/A10_2021-Server-Side_Request_Forgery_%28SSRF%29/
Understanding the OWASP Top 10 vulnerabilities is crucial for developing secure web applications. By adopting the right security practices and staying updated on emerging threats, organizations can greatly mitigate their risk. Key measures include input validation, robust authentication, and secure coding practices to protect against common vulnerabilities such as SQL injection and cross-site scripting (XSS).
Application security is an ongoing process. Regular security assessments, detailed code reviews, and extensive employee training are essential for maintaining a strong security posture. Additionally, adopting a proactive approach to threat modeling and incorporating security into the software development lifecycle (SDLC) can further enhance an organization’s defenses against evolving cyber threats.
The post Understanding the OWASP Top 10 Application Vulnerabilities appeared first on Strobes Security.
*** This is a Security Bloggers Network syndicated blog from Strobes Security authored by Likhil Chekuri. Read the original post at: https://strobes.co/blog/understanding-the-owasp-top-10-application-vulnerabilities/