# Daily Prayer Time <= 2026.08.20 - Authenticated (Editor+) SQL Injection via City ID and Timetable CSV Import

- **ID:** WPSEC-2026-4131
- **Plugin:** Daily Prayer Time (`daily-prayer-time-for-mosques`), https://wordpress.org/plugins/daily-prayer-time-for-mosques/
- **Affected versions:** all versions before 2026.10.30
- **Fixed in:** 2026.10.30 (Update to 2026.10.30 or later.)
- **Severity:** Medium 4.9 (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N)
- **Weakness:** CWE-89
- **Usage among sites WPSec scans:** plugin Low, affected versions Low (as of 2026-11-27)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/daily-prayer-time-for-mosques
- **Fix released:** 2026-11-26
- **Published:** 2026-11-27
- **URL:** https://wpsec.com/vuln/WPSEC-2026-4131/

## Description

The Daily Prayer Time plugin for WordPress is vulnerable to SQL Injection via the 'city' parameter of the automatic start time settings and the is_ramadan column of an uploaded timetable CSV in all versions up to, and including, 2026.08.20. This is due to these values being concatenated into SQL queries without sufficient escaping or prepared statements. The city ID only goes through sanitize_text_field() and is placed unquoted in a SELECT. The CSV column is never validated and is placed inside quotes in the timetable INSERT ... ON DUPLICATE KEY UPDATE statement. The plugin's settings page only requires the publish_pages capability, so this makes it possible for authenticated attackers, with editor-level access and above, to append additional SQL queries into already existing queries that can be used to extract sensitive information from the database.

## References

- https://wpsec.com/vuln/WPSEC-2026-4131/
- https://plugins.svn.wordpress.org/daily-prayer-time-for-mosques/tags/2026.10.30/
- https://wordpress.org/plugins/daily-prayer-time-for-mosques/

Source: WPSec, https://wpsec.com/vuln/WPSEC-2026-4131/

License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Free to use, share and adapt, also commercially, if you credit WPSec and link to this advisory.
