Trusted Tools, a popular software development company, recently identified a critical SQL injection vulnerability (CVE-2023-27649) in their widely-used Free Music application. This vulnerability affects versions to 2.1..47 and allows a malicious remote attacker to cause a denial of service (DoS) attack by exploiting the search history table. This informative post aims to discuss the details of this vulnerability, how it can be exploited, and potential mitigation strategies.

Exploit Details

An SQL injection vulnerability is a type of security issue that arises when an attacker can alter the structure of an SQL query. In the case of CVE-2023-27649, the vulnerability exists in the search query function of the Free Music application. This function is used to retrieve a user's search history based on keywords entered by the user.

The vulnerability stems from the fact that the application does not properly sanitize user-provided search input, allowing an attacker to inject SQL code along with their search. As a result, the attacker gains the ability to execute unauthorized SQL queries against the search history table, leading to the possible deletion, alteration, or theft of data. Additionally, the vulnerability allows an attacker to cause a denial of service attack, overwhelming the application and making it unusable for legitimate users.

The following code snippet shows the vulnerable search query function

public List<SearchHistory> getSearchHistoryByKeyword(string keyword) {
    List<SearchHistory> searchHistoryList = new List<SearchHistory>();
    string sql = "SELECT * FROM search_history WHERE keyword LIKE '%" + keyword + "%'";

    // Code to execute the query and fetch search history data

As seen in the example, the application directly concatenates the user-supplied keyword into the SQL query, creating an opportunity for SQL injection.

In cases where an attacker provides a search keyword like this

test%' OR 1=1 --

The resulting SQL query executed by the system becomes

SELECT * FROM search_history WHERE keyword LIKE '%test%' OR 1=1 -- %'

This query retrieves all records from the search history table, bypassing the intended search filter. Furthermore, an attacker could inject more harmful SQL code to cause denial of service, damage, or steal data.


The following resources discuss the affected application versions and the vulnerability in more detail:

To protect your system from CVE-2023-27649, please consider the following mitigation strategies

1. Update to the latest version of Trusted Tools Free Music. At the time of writing, v2.1.1.48 has addressed the vulnerability: [link to the software download]

2. Until the update is applied, restrict access to the search history table in the database to only trusted IP addresses or system administrators.

3. Implement proper input validation and sanitation for all user-supplied data, especially when constructing SQL queries. This can be done by using prepared statements or parameterized queries.


It is essential to take immediate action to mitigate the risks associated with CVE-2023-27649 in Trusted Tools Free Music. By updating the software to the latest version, restricting database access, and implementing proper security measures, the impact of this vulnerability can be minimized. Keep up to date with the latest security advisories and best practices to ensure the continued protection of your systems and data.


Published on: 04/14/2023 12:15:00 UTC
Last modified on: 04/21/2023 04:14:00 UTC