high CVSS 8.8

CVE-2024-2018·PHP vulnerability

The WP Activity Log Premium plugin for WordPress is vulnerable to SQL Injection via the entry->roles parameter in all versions up to, and including, 4.6.4 due to insufficient escaping on the user supplied parameter and lack of sufficient preparation on the existing SQL query. This makes it possible for authenticated attackers with subscriber privileges to append additional SQL queries into already existing queries that can be used to extract sensitive information from the database. One demonstrated attack included the injection of a PHP Object.

Severity
high
Software
PHP
Fixed in
4.6.4.1
Published
2024-04-09

Affected versions

Until: 4.6.4.1

Fixed in: 4.6.4.1

How to fix this CVE

Upgrade the WP Activity Log Premium plugin to version 4.6.4.1 or later, which includes proper parameterized queries and input validation to prevent SQL injection attacks. If you cannot upgrade immediately, disable the plugin and review your database access logs for suspicious activity. Ensure all WordPress installations using this plugin are patched within 48 hours to prevent unauthorized data extraction.

sudo dnf update php php-mysql php-cli

Defensia detects this vulnerability

What an exploitation attempt looks like

Sample log line indicative of exploitation attempts:

POST|GET request containing URL parameters matching `entry(\[|->)roles` followed by SQL keywords: `(union|select|insert|update|delete|drop|or|and)\s+(select|1=1|benchmark|sleep)` in query strings or POST body data

WAF mitigation (if patching is not yet possible)

Add this rule to your WAF to block exploitation attempts while you schedule the patch.

Implement WAF rules to block HTTP requests containing suspicious SQL syntax in the entry->roles or entry[roles] parameters. Use a regex pattern: `entry(\[|->)roles.*?(union|select|insert|update|delete|drop|benchmark|sleep|cast|concat|0x[0-9a-f]+)` and set to block action. Additionally, enforce stored procedure parameterization at the application layer and implement request rate limiting on the plugin's API endpoints.

How to check if you are affected

  1. Step 1: Check PHP version with `php --version` and verify WordPress plugin version with `grep "Version:" /path/to/wp-content/plugins/wp-activity-log/wp-activity-log.php`
  2. Step 2: Identify vulnerable installations by searching for WP Activity Log versions ≤4.6.4 in all WordPress directories: `find /var/www -name 'wp-activity-log.php' -exec grep -l 'Version:' {} \;`
  3. Step 3: Search web server logs for SQL injection patterns targeting the 'entry->roles' parameter: `grep -i "entry\[roles\]\|entry->roles\|union.*select\|or.*1=1" /var/log/apache2/access.log /var/log/nginx/access.log 2>/dev/null`
  4. Step 4: Verify the plugin is updated by checking the version string matches 4.6.4.1 or higher: `grep -i 'version.*4\.6\.[5-9]\|version.*4\.[7-9]\|version.*[5-9]' /path/to/wp-content/plugins/wp-activity-log/wp-activity-log.php`

FAQ

What is CVE-2024-2018?

CVE-2024-2018 is a SQL injection vulnerability in the WP Activity Log Premium WordPress plugin versions up to 4.6.4 that allows authenticated subscribers to manipulate the 'entry->roles' parameter and execute arbitrary SQL queries, potentially exposing sensitive database information including user credentials and site configuration data.

Is CVE-2024-2018 being actively exploited?

No, CVE-2024-2018 is not currently listed in CISA's Known Exploited Vulnerabilities (KEV) catalog and no public exploits have been disclosed, but it requires only subscriber-level access to trigger, making it a moderate-risk threat in multi-user WordPress environments.

What versions of PHP are affected by CVE-2024-2018?

This vulnerability affects WP Activity Log Premium plugin versions up to and including 4.6.4; it is not a PHP version-specific issue. The fix is available in plugin version 4.6.4.1 and later.

How do I check if my server is vulnerable to CVE-2024-2018?

Run `grep -i 'Version' /path/to/wp-content/plugins/wp-activity-log/wp-activity-log.php` to retrieve the installed plugin version. If the version is 4.6.4 or lower, your installation is vulnerable and requires immediate update to 4.6.4.1.

Does Defensia detect CVE-2024-2018?

Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If WP Activity Log Premium is installed on a monitored server, CVE-2024-2018 will appear in your dashboard with remediation steps.

Related PHP CVEs

CVE-2026-39337CVSS 10ChurchCRM is an open-source church management system. Prior to 7.1.0, critical pre-authentication remote code execution vulnerability in ChurchCRM's setup wizard allows unauthenticated attackers to inject arbitrary PHP code during the initial installation process, leading to complete server compromise. The "$dbPassword" variable is not sanitized. This vulnerability exists due to an incomplete fix for CVE-2025-62521. This vulnerability is fixed in 7.1.0.
CVE-2024-5932CVSS 10The GiveWP – Donation Plugin and Fundraising Platform plugin for WordPress is vulnerable to PHP Object Injection in all versions up to, and including, 3.14.1 via deserialization of untrusted input from the 'give_title' parameter. This makes it possible for unauthenticated attackers to inject a PHP Object. The additional presence of a POP chain allows attackers to execute code remotely, and to delete arbitrary files.
CVE-2026-28289CVSS 10FreeScout is a free help desk and shared inbox built with PHP's Laravel framework. A patch bypass vulnerability for CVE-2026-27636 in FreeScout 1.8.206 and earlier allows any authenticated user with file upload permissions to achieve Remote Code Execution (RCE) on the server by uploading a malicious .htaccess file using a zero-width space character prefix to bypass the security check. The vulnerability exists in the sanitizeUploadedFileName() function in app/Http/Helper.php. The function contains a Time-of-Check to Time-of-Use (TOCTOU) flaw where the dot-prefix check occurs before sanitization removes invisible characters. This vulnerability is fixed in 1.8.207.
CVE-2025-62521CVSS 10ChurchCRM is an open-source church management system. Prior to version 5.21.0, a pre-authentication remote code execution vulnerability in ChurchCRM's setup wizard allows unauthenticated attackers to inject arbitrary PHP code during the initial installation process, leading to complete server compromise. The vulnerability exists in `setup/routes/setup.php` where user input from the setup form is directly concatenated into a PHP configuration template without any validation or sanitization. Any parameter in the setup form can be used to inject PHP code that gets written to `Include/Config.php`, which is then executed on every page load. This is more severe than typical authenticated RCE vulnerabilities because it requires no credentials and affects the installation process that administrators must complete. Version 5.21.0 patches the issue.
CVE-2025-47916CVSS 10Invision Community 5.0.0 before 5.0.7 allows remote code execution via crafted template strings to themeeditor.php. The issue lies within the themeeditor controller (file: /applications/core/modules/front/system/themeeditor.php), where a protected method named customCss can be invoked by unauthenticated users. This method passes the value of the content parameter to the Theme::makeProcessFunction() method; hence it is evaluated by the template engine. Accordingly, this can be exploited by unauthenticated attackers to inject and execute arbitrary PHP code by providing crafted template strings.

References

Track CVEs across your fleet automatically

Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-2018. Free for 1 server.

Get started free