Local File Inclusion (LFI) is flagged as a high-severity vulnerability within the Madara Theme for Wordpress that permits unauthenticated attackers to read arbitrary files residing on the targeted server.
The affected plugin has been assigned CVE-2025-4524.The vulnerability lies within the madara_load_more AJAX request handler where an attacker can manipulate the template paramater to traverse through the filesystem and obtain sensitive data such as /etc/passwd, or various configuration files contained on the Wordpress server.
Technical Details
The vulnerable endpoint for the LFI attack is at /wp-admin/admin-ajax.php. A crafted POST request with a specially constructed template value (using directory traversal sequences like ../../../../../../../etc/passwd) can force the theme to include and display arbitrary files.
Here’s a simplified view of the attack:
http
POST /wp-admin/admin-ajax.php HTTP/2
Host: target.com
Content-Type: application/x-www-form-urlencoded
action=madara_load_more&page=1&template=plugins/../../../../../../../etc/passwd&...
The vulnerability is considered critical because:
1. It requires no authentication.
2. It can be exploited remotely.
3. There is a possible risk of complete server compromise, if sensitive files (wp-config.php, .env files, SSH keys, etc.) are readable.
Affected Versions
All versions of the Madara theme before the most recently patched version are affected. It is highly recommended that users upgrade to the newest available version of the theme immediately.
Recommendations
1. You must update your Madara theme to the latest secure version as soon as possible.
2. Temporary Fix: If you cannot update immediately, then consider disabling the madara_load_more feature or blocking access to the admin-ajax.php "endpoint" by unauthenticated users. Be aware that this may cause some features of the theme to malfunction.
3. Logs: Monitor your logs for suspicious POST requests to admin-ajax.php which include a lot of sequences of ../ in the parameter for the template.
4. Least Privilege: Have the least number of file permissions possible for your WordPress site and periodically review any themes or plugins you have installed.
This is just another reminder that popular WordPress themes can be high-value targets because of unauthenticated file insertion vulnerabilities. Themes such as Madara are used by many people to build manga/comic/novels website, which often have large user bases. Therefore, they are likely to be attacked by hackers/attackers.
If you are using the Madara theme, make sure that this is a extremely high priority update for you. A few minutes to patch the site is much better than the possibility of having sensitive data exposed or having your whole server comprised.
Source: Exploit DB