Overview
This report covers CVE-2017-20197, a critical SQL injection vulnerability found in the propanetank Roommate-Bill-Tracking software up to version 288437f658fc9ee7d4b92a9da12557024d8bc55c. The vulnerability specifically affects the /includes/login.php file. If exploited, this vulnerability has the potential for system compromise and data leakage. It is of significant importance due to the potential to gain unauthorized access to sensitive data or systems.
Vulnerability Summary
CVE ID: CVE-2017-20197
Severity: Critical (7.3 CVSS Score)
Attack Vector: Remote
Privileges Required: None
User Interaction: Required
Impact: Potential system compromise or data leakage
Affected Products
Product | Affected Versions
propanetank Roommate-Bill-Tracking | Up to 288437f658fc9ee7d4b92a9da12557024d8bc55c
How the Exploit Works
The exploit works by manipulating the “Username” argument in the /includes/login.php file. This is a classic example of a SQL injection attack, where an attacker can insert malicious SQL code into a query that is designed to pull up user credentials. When the query is executed, the malicious code runs, potentially giving the attacker full access to all data held in the database.
Conceptual Example Code
A conceptual example of this vulnerability might look like this:
POST /includes/login.php HTTP/1.1
Host: target.example.com
Content-Type: application/x-www-form-urlencoded
username=' OR '1'='1'; --&password=whatever
In this example, the ‘ OR ‘1’=’1′ is the SQL injection, which will always evaluate to true and provide access to the attacker.
Recommendations for Mitigation
It is recommended to apply the vendor-supplied patch (b32bb1b940f82d38fb9310cd66ebe349e20a1d0a) to fix this issue. If the patch cannot be applied immediately, use a Web Application Firewall (WAF) or an Intrusion Detection System (IDS) as a temporary mitigation measure.
