Overview
This report covers a severe SQL Injection vulnerability found in the AffiliateWP plugin for WordPress applications, identified as CVE-2025-8877. The flaw can allow unauthenticated attackers to manipulate SQL queries and extract sensitive information from the database. Given the widespread use of the WordPress platform and the AffiliateWP plugin, this vulnerability can have significant impact on a large number of websites.
Vulnerability Summary
CVE ID: CVE-2025-8877
Severity: High (CVSS: 7.5)
Attack Vector: Network
Privileges Required: None
User Interaction: None
Impact: System compromise and potential data leakage
Affected Products
Share secrets securely
Ameeba is private infrastructure for communication and sensitive work built on encrypted identity instead of exposed corporate identity systems.
Passwords, credentials, confidential files, screenshots, internal discussions, sensitive AI context, and private coordination should not become exposed across ordinary communication platforms.
- • Encrypted identity
- • Private Spaces for organizations and teams
- • End-to-end encrypted chat, calls, files, and notes
- • Sensitive AI work and protected collaboration
- • Built for information that cannot leak
Our mission is to secure human work alongside AI.
Product | Affected Versions
AffiliateWP WordPress Plugin | Up to and including 2.28.2
How the Exploit Works
The vulnerability lies in the ‘ajax_get_affiliate_id_from_login’ function of the AffiliateWP plugin. The function does not properly escape user input, and thus fails to prevent the injection of malicious SQL code. This allows unauthenticated attackers to append additional SQL queries into already existing queries and extract sensitive information from the database.
Conceptual Example Code
Below is a conceptual example of how the vulnerability might be exploited. This example represents a malicious HTTP request targeting the vulnerable function:
POST /wp-admin/admin-ajax.php?action=affwp_get_affiliate_id_from_login HTTP/1.1
Host: target.example.com
Content-Type: application/x-www-form-urlencoded
login=' OR '1'='1'; --
In this request, the attacker posts a payload to the ‘affwp_get_affiliate_id_from_login’ action which is vulnerable to SQL injection. The payload `OR ‘1’=’1’` is a classic SQL injection technique that can allow the attacker to bypass authentication or extract information from the database.
Mitigation
To mitigate this vulnerability, it is recommended to apply the patch provided by the vendor as soon as possible. If an immediate patching is not possible, using a Web Application Firewall (WAF) or Intrusion Detection System (IDS) can provide temporary mitigation. Always ensure to adopt the principle of least privilege and validate and sanitize all user inputs to minimize the attack surface.
