CVE-2021-47760
TestLink · TestLink
A critical vulnerability exists in multiple versions of TestLink that allows an unauthenticated attacker to download any file from the server.
Executive summary
A critical vulnerability exists in multiple versions of TestLink that allows an unauthenticated attacker to download any file from the server. This flaw can be easily exploited by manipulating a URL, bypassing all security checks, and could lead to a significant data breach of sensitive project information, intellectual property, and other confidential data stored within the application.
Vulnerability
The vulnerability is an improper access control flaw in the attachmentdownload.php file. An unauthenticated attacker can craft a specific URL to request any file attachment stored in TestLink by its numerical ID. By including the parameter skipCheck=1 in the request, the application's standard security and session checks are bypassed, granting the attacker direct access to download the specified file. The attacker can systematically iterate through file IDs to discover and exfiltrate all attachments hosted on the platform.
Business impact
This vulnerability is rated as critical severity with a CVSS score of 9.8. Successful exploitation could lead to a catastrophic data breach, exposing sensitive project plans, test results, source code snippets, intellectual property, and potentially personally identifiable information (PII) that has been uploaded as an attachment. The business impact includes severe reputational damage, loss of competitive advantage, potential legal and regulatory fines for data exposure, and the cost associated with incident response and recovery. Since the attack requires no authentication, any internet-facing TestLink instance is at high risk.
Remediation
Immediate Action: Immediately upgrade all instances of TestLink to the latest patched version that resolves this vulnerability, as per the vendor's advisory. After patching, it is crucial to review web server and application access logs for any evidence of past exploitation attempts targeting the attachmentdownload.php endpoint.
Proactive Monitoring: Security teams should implement monitoring rules to detect and alert on suspicious requests to the attachmentdownload.php endpoint. Specifically, look for requests containing the skipCheck=1 parameter. Monitor for a high volume of requests to this endpoint from a single IP address, especially with sequentially incrementing id parameter values, as this is a strong indicator of an attacker attempting to enumerate and download all available files.
Compensating Controls: If patching cannot be performed immediately, implement a Web Application Firewall (WAF) rule to block any incoming requests to attachmentdownload.php that contain the string skipCheck=1. Additionally, restrict network access to the TestLink application to only trusted IP ranges or require users to connect via a secure VPN to limit the attack surface.
Exploitation status
Public Exploit Available: true
Analyst recommendation
Given the critical CVSS score of 9.8 and the public availability of a simple exploit, this vulnerability poses an immediate and severe threat to the organization. We strongly recommend that all affected TestLink instances be patched immediately without delay. If patching is not possible, the compensating controls listed above, particularly implementing a WAF rule, should be deployed as an emergency measure. A full review of access logs is essential to determine if a data breach has already occurred.