zoneminder/web/api/app/Controller
Isaac Connor ffe6362dc3 fix: harden web interface against injection and SSRF vulnerabilities
FilterTerm.php:
- Replace eval() with safe compare() method for SystemLoad, DiskPercent,
  and DiskBlocks filter conditions (RCE via crafted op/val)
- Validate operator against allowlist in constructor
- Sanitize collate field to alphanumeric/underscore only (SQLi)

onvifprobe.php:
- Use escapeshellarg() on interface, device_ep, soapversion, username,
  and password arguments passed to execONVIF() (command injection)

Event.php:
- Use escapeshellarg() on all arguments to zmvideo.pl instead of
  escapeshellcmd() on the whole command (command injection via format)
- Anchor scale regex with ^ and $ to prevent partial matches

image.php:
- Restrict proxy URL scheme to http/https only (SSRF via file:// etc)

filterdebug.php:
- Use already-sanitized $fid instead of raw $_REQUEST['fid'] (XSS)

MonitorsController.php:
- Use escapeshellarg() on token, username, password, and monitor id
  in zmu shell command instead of escapeshellcmd() on whole command

HostController.php:
- Use escapeshellarg() on path in du command (command injection via mid)
- Remove space from daemon name allowlist (argument injection)

EventsController.php:
- Remove single quotes from interval expression regex (SQLi)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 23:30:49 -04:00
..
Component Don't add a space if there is no operator 2025-12-19 17:49:22 -05:00
AppController.php Handle user being undefined when not logged in 2024-02-11 19:12:37 -05:00
CameraModelsController.php [API] Fix User variable from array to object 2023-04-23 22:07:24 +02:00
ConfigsController.php Fix RCE vulnerability via API config edit privilege escalation 2026-02-26 13:51:30 -05:00
ControlsController.php Merged Angular UI branch API to master 2015-06-11 02:58:58 +00:00
EventDataController.php [API] Fix User variable from array to object 2023-04-23 22:07:24 +02:00
EventsController.php fix: harden web interface against injection and SSRF vulnerabilities 2026-03-08 23:30:49 -04:00
FramesController.php Use viewableMonitorIds instead of deprecated MonitorIds 2023-05-12 08:59:36 -04:00
GroupsController.php [API] Fix User variable from array to object 2023-04-23 22:07:24 +02:00
HostController.php fix: harden web interface against injection and SSRF vulnerabilities 2026-03-08 23:30:49 -04:00
LogsController.php [API] Fix User variable from array to object 2023-04-23 22:07:24 +02:00
ManufacturersController.php [API] Fix User variable from array to object 2023-04-23 22:07:24 +02:00
MonitorsController.php fix: harden web interface against injection and SSRF vulnerabilities 2026-03-08 23:30:49 -04:00
NotificationsController.php fix: address Copilot review feedback on Notifications API refs #4684 2026-03-05 20:39:54 -05:00
PagesController.php further merges from cakephp 2.10.8 2018-03-21 13:09:55 -04:00
RolesController.php feat: add User Roles feature for reusable permission templates 2026-01-29 13:34:27 -05:00
ServerStatsController.php Add named parameters support to ServerStatsController. 2023-10-26 18:26:51 -04:00
ServersController.php [API] Fix User variable from array to object 2023-04-23 22:07:24 +02:00
SnapshotsController.php [API] Fix User variable from array to object 2023-04-23 22:07:24 +02:00
StatesController.php [API] Fix User variable from array to object 2023-04-23 22:07:24 +02:00
StorageController.php Add named parameter filtering to Storage controller 2023-05-12 14:10:53 -04:00
TagsController.php fix: add event ID to tags response. ref #4569 2026-01-26 06:40:42 -05:00
UserPreferenceController.php Finish roughing in UserPreference in api 2023-05-12 14:10:53 -04:00
UsersController.php [API] Fix User variable from array to object 2023-04-23 22:07:24 +02:00
ZonePresetsController.php fix spacing/quotes/google code style 2018-07-24 16:41:09 -04:00
ZonesController.php Add Create to canEdit 2026-02-26 07:21:13 -05:00