high CVSS 7.5

CVE-2024-49701·PHP vulnerability

Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') vulnerability in themehorse Mags mags.This issue affects Mags: from n/a through <= 1.1.6.

Severity
high
Software
PHP
Fixed in
1.1.7
Published
2024-10-23

Affected versions

Until: 1.1.7

Fixed in: 1.1.7

How to fix this CVE

The Mags WordPress theme versions up to 1.1.6 contain a local file inclusion vulnerability that allows attackers to manipulate file paths in include/require statements. Immediately update the Mags theme to version 1.1.7 or later through the WordPress dashboard or by downloading directly from the official source. After updating, verify the theme activation and review your server logs for any suspicious file access patterns.

sudo dnf update php

Defensia detects this vulnerability

What an exploitation attempt looks like

Sample log line indicative of exploitation attempts:

GET|POST request patterns containing encoded or raw path traversal sequences (../, ..\, %2e%2e%2f) targeting Mags theme files, particularly targeting theme include/require hooks or file parameter manipulation in URLs like: ?mags_file=../../wp-config.php or similar patterns in query strings

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 requests containing path traversal sequences (../, ..\ , %2e%2e%2f, %252e%252e%252f) targeting WordPress theme directories. Specifically monitor and block GET/POST requests to Mags theme files that include file parameter manipulation or include/require path abuse patterns. Add rules to whitelist only expected theme file paths.

How to check if you are affected

  1. Step 1: Verify PHP version and theme version by running: wp theme list --allow-root in the WordPress directory to identify if Mags theme version <= 1.1.6 is installed
  2. Step 2: Check if the Mags theme is actively used on your site by examining wp-content/themes/ directory and confirming Mags is the active theme via wp option get template --allow-root
  3. Step 3: Search web server logs for suspicious file inclusion patterns using: grep -i 'include\|require\|\.\./' /var/log/apache2/access.log | grep -i 'mags' or examine /var/log/nginx/access.log for similar patterns
  4. Step 4: After updating to Mags 1.1.7, confirm the theme version using: wp theme list --allow-root and verify no errors appear in wp-content/debug.log

FAQ

What is CVE-2024-49701?

CVE-2024-49701 is a local file inclusion (LFI) vulnerability in the Mags WordPress theme that allows attackers to manipulate how files are included or required by the theme, potentially leading to unauthorized file access or remote code execution.

Is CVE-2024-49701 being actively exploited?

No, according to CISA's Known Exploited Vulnerabilities catalog, CVE-2024-49701 is not currently being actively exploited in the wild, and no public exploits have been released.

What versions of the Mags theme are affected by CVE-2024-49701?

All versions of the Mags WordPress theme from the earliest release up to and including version 1.1.6 are vulnerable. Version 1.1.7 and later contain the security fix.

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

Navigate to your WordPress admin dashboard, go to Appearance > Themes, and look for the Mags theme. If installed and active, check its version number—if it shows 1.1.6 or earlier, your site is vulnerable. You can also run: wp theme get mags --field=version --allow-root

Does Defensia detect CVE-2024-49701?

Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Mags WordPress theme is installed on a monitored server, CVE-2024-49701 will appear in your dashboard with remediation steps.

Related PHP CVEs

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-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-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-25174CVSS 10Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') vulnerability in beeteam368 BeeTeam368 Extensions beeteam368-extensions allows PHP Local File Inclusion.This issue affects BeeTeam368 Extensions: from n/a through <= 1.9.4.
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.

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-49701. Free for 1 server.

Get started free