
"Is your website at risk? Discover why outdated libraries are a ticking time bomb"
Celia CatalánShare
Vulnerable and Outdated Components
Introduction
Modern web applications follow multi-component software architectures such as databases, APIs (Application Programming Interface), libraries, frameworks, operating systems, etc. The management and inventory of software components is a basic and necessary task for organizations, given its importance in ensuring security, maintaining compatibility, optimizing performance, reducing operational risks, and ensuring compliance with current regulations and licenses such as ISO or GDPR.
"As a consequence of the lack of maintenance of software components, there are risks such as the vulnerability of Vulnerable and Outdated Components, which is one of the main security threats identified in the OWASP Top Ten of 2021, ranked in sixth position."
Vulnerable Components vs Outdated Components
Vulnerable Components are those that have security vulnerabilities that attackers can exploit to access sensitive information or gain access to the system.
On the other hand, Outdated Components refers to the use of software components that no longer receive security updates, and therefore lack security patches that address existing vulnerabilities.
Impact
Some of the vulnerabilities that affect vulnerable or outdated components and that may be susceptible to exploitation by malicious users are as follows:
- Code Injection: A security vulnerability that allows an attacker to introduce malicious code into an application (typically through unvalidated or poorly sanitized user inputs) which is executed by the application, allowing the attacker to perform unauthorized actions.
- Buffer overflow: Buffer overflows occur when the allocated memory capacity is exceeded, allowing attackers to alter and corrupt data in adjacent memory. This can result in the execution of malicious code that causes system crashes, alters security controls, or allows privilege escalation.
- Cross Site Scripting: Cross-Site Scripting is a critical risk for modern web applications, as it allows attackers to inject malicious scripts into trusted sites. A common approach is stored XSS, where attackers insert scripts into vulnerable third-party components, taking advantage of the lack of updates and security reviews, which can lead to persistent threats affecting multiple users and systems.
Identify vulnerable and outdated components
The first step in detecting vulnerable components is to identify the existing software in the application or system and their versions. Identifying these versions may involve different approaches, tools, and techniques, such as those discussed below:
- Source code: The code is the backbone of any software and, if it contains security flaws, it can be exploited to compromise the integrity, confidentiality, and availability of a system. Vulnerabilities in the code often arise from poor programming practices or from the integration of outdated third-party libraries.
Static Application Security Testing (SAST) is a technique that allows for the review of an application's source code without executing it, with the aim of identifying patterns that represent security vulnerabilities. This analysis is carried out using automated tools that detect bad practices, violations of secure programming standards, and the use of critical functions.
- Display of versions in the frontend: It is common to find in web applications versions of the components used in the public interface.
- HTTP Headers: Some web applications and servers expose software versions in the HTTP headers of responses. These headers may include details such as the web server used (Apache, Nginx, IIS), versions of PHP, Python, ASP.NET, or even information about frameworks such as Django or Ruby on Rails.
- Server: Exposes the type and version of the web server.
- Example: Server: Apache/2.4.49 (Ubuntu)
- X-Powered-By: Indicates the programming language or framework used.
- Example: X-Powered-By: PHP/7.4.3 or X-Powered-By: ASP.NET
- Via: It may reveal details about proxies or gateways used.
- Example: Way: 1.1 vegur
- X-AspNet-Version: ASP.NET application specific.
- Example: X-AspNet-Version: 4.0.30319
- X-Drupal-Cache: In systems based on Drupal.
- Example: X-Drupal-Cache: HIT
- Triggering errors: The practice of subjecting a system, application, or software to situations that trigger unexpected behaviors, failures, or unusual responses can reveal some of the technologies used.
- Banner Grabbing: Banner grabbing is a widely used technique to obtain information about the versions of services running on a server. Many services, such as web servers, FTP, SSH, or SMTP, return banners upon connection that include the name of the software, its version, and sometimes additional information.
- Vulnerability scanning and service enumeration tools: Vulnerability scanning tools typically identify component versions based on the responses that servers or services provide to certain requests or characteristics.
- Interaction with APIs: Many web applications expose APIs that provide details about the software, including versions. Some APIs return this information in HTTP headers or JSON responses.
Some interesting tools
Nmap
Nessus / OpenVAS
Nobody
WhatWeb
Wappalyzer
Retire.js
Mitigation/Remediation
- Maintain an inventory of employed technologies (libraries, frameworks, software components used in the application or system including details such as the specific versions of each component and their origin, which allows for quick identification of those that are outdated or vulnerable.
- Stay updated: It is crucial to be aware of security updates and newly discovered vulnerabilities affecting the software components used. This involves subscribing to security bulletins, following databases of known vulnerabilities (such as CVE), using automated tools to detect outdated and vulnerable versions, and actively monitoring alerts from the providers of the technologies employed. Developers must maintain good security practices in the applications developed to avoid future issues.
- Good development practices. It is advisable when developing web applications to avoid using libraries, frameworks, or tools that do not receive regular updates or that do not have an active community that can respond to vulnerabilities and improvement needs.