Close SQL injection, command injection, and shell escaping gaps
fix: close SQL injection, command injection, and shell escaping gaps
Close SQL injection, command injection, and shell escaping gapsb3a7c0-fix-close-sql-injection-command-injection-and-cve-2026-102608fixclose sql injection command shell escaping
Committed by connortechnology
commit message
fix: close SQL injection, command injection, and shell escaping gaps
FilterTerm.php:
- Use intval() on AlarmedZoneId value in SQL subquery to prevent
injection via crafted filter val
report_event_audit.php, montagereview.php:
- Cast $selected_monitor_ids through array_map('intval') before
interpolating into SQL IN clause (values come from $_REQUEST)
download_functions.php:
- Replace manual single-quoting with escapeshellarg() for merged
file name in ffmpeg, tar, and zip commands (monitor names can
contain shell metacharacters including single quotes)
- Same fix for export list file path
export_functions.php:
- Use escapeshellarg() on source and destination paths in cp -as
commands during event export
functions.php:
- Validate column keys in getFormChanges() against /^[a-zA-Z0-9_]+$/
to prevent SQL injection via crafted array keys from $_REQUEST
- Use dbEscape() and intval() for image/document MIME type and size
fields instead of raw string interpolation
- Replace escapeshellcmd() with escapeshellarg() in deletePath()
rm -rf command
Co-Authored-By: Claude Opus 4.6 <[email protected]>Editor assessment
This commit patches CVE-2026-102608. This related branch carries the same thorough file-by-file inventory: SQL injection through AlarmedZoneId and monitor IDs, shell escaping for ffmpeg/tar/zip and export paths, column-key validation, MIME sanitization, and escapeshellarg replacing escapeshellcmd. Clear, scannable and verifiable. The clean header needs no scope. Formally the header and body are clean and the fixes are listed audibly; the only optional addition is a scope. The body is already a strong inventory; a sentence on the shared root cause tying the sinks together is the only missing synthesis.