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 phpDefensia 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 stringsWAF 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
- 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
- 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
- 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
- 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
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