How to Exploit SQli & XSS in weDevs | CVE-2021-25076

The WP User Frontend WordPress plugin before version 3.5.26 contains a security vulnerability in the Subscribers dashboard. This vulnerability arises from the plugin's failure to properly validate and escape the 'status' parameter before incorporating it into a SQL statement. As a result, this oversight can lead to SQL injection attacks. Furthermore, due to insufficient sanitisation and escaping, there is also the potential for Reflected Cross-Site Scripting (XSS) to occur. It is recommended to update the plugin to version 3.5.26 or later to mitigate these security risks.
Disclaimer
The content provided here is for educational purposes only. It is designed to help security enthusiasts and professionals understand vulnerabilities and improve application security. Please use the information responsibly and never for illegal activities or unauthorized testing. Always ensure you have proper authorization before performing any security testing on systems, applications, or networks.
We are not responsible for any misuse of the materials shared here or any consequences that arise from their use. All testing should be done in a controlled environment, such as the labs or Docker images we provide, or with explicit permission from system owners. By using OpenExploit resources, you agree to follow applicable laws and ethical guidelines.
About weDevs
weDevs is a software company specializing in WordPress-based solutions. They create user-friendly plugins and tools designed to enhance the functionality and performance of websites. Their popular products include Dokan, a multi-vendor marketplace plugin, and WP Project Manager, a tool for managing projects and tasks efficiently. With a focus on innovation and customer satisfaction, weDevs is dedicated to delivering top-quality solutions that help businesses succeed online.
Mitigation
To mitigate the SQL injection vulnerability in The WP User Frontend WordPress plugin before version 3.5.26, follow these steps:
- Update the Plugin: Ensure you are using the latest version of the WP User Frontend plugin. Update to version 3.5.26 or later where the issue has been addressed.
- Sanitize and Escape Inputs: Inputs should be sanitized (cleaned of invalid characters) and escaped (made safe for use in SQL statements) before using them in any SQL queries. Implement proper validation checks for all user-provided inputs, including the 'status' parameter.
- Utilize WordPress’s built-in functions such as
esc_sql()
,sanitize_text_field()
, and prepared statements provided
- Utilize WordPress’s built-in functions such as
Exploit Scenario
The exploit scenario for the WP User Frontend WordPress plugin before version 3.5.26 involves a vulnerability where the "status" parameter used in the SQL query in the Subscribers dashboard is not properly validated and escaped. This oversight can be exploited by an attacker in the following ways:
- SQL Injection:
- An attacker can craft a malicious request with a specially crafted "status" parameter that includes SQL injection payloads.
- When this request is processed by the plugin, the SQL injection payload is included in the SQL query without proper sanitization or escaping.
- As a result, the attacker can manipulate SQL queries to perform unauthorized actions, such as accessing, modifying or deleting data in the database. This can compromise the integrity and confidentiality
DockerHub Link
To try out a demo environment for CVE-2021-25076, you can visit our DockerHub repository here
Video Tutorial
Video tutorials for exploiting CVE-2021-25076 is available here
About OpenExploit

OpenExploit is a learning platform dedicated to exploring and understanding vulnerabilities in open-source and widely used applications. We focus on manual exploitation techniques, enabling security enthusiasts to learn and build their skills without over-reliance on automation scripts.