You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
security: harden shell command execution against injection (1.2.x backport) (#6902)
* security: harden shell command execution against injection (1.2.x backport)
- Apply cacti_escapeshellarg() to hostname in lib/ping.php
- Escape PHP binary and script path in graph_realtime.php shell_exec
- Escape host_id in host_reindex shell command
- Replace shell_exec chown with PHP chown()/chgrp() with return value checks in rrd.php and boost.php
- Escape db_dump_data exec arguments in lib/rrd.php
- Use cacti_escapeshellarg() in scripts/sql.php and scripts/ss_sql.php
- Parse mysqladmin output in PHP instead of piping through awk
- Add unit tests for graph_realtime shell and SQL script hardening
Addresses GHSA-xq98-376r-hv9j (Critical)
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
* Remove type casting from host_id assignment
* Fix local_graph_id retrieval in view case
* Change local_graph_id retrieval method
* Execute command using shell_exec in ss_sql.php
Add shell_exec to execute command for database operations.
---------
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Co-authored-by: TheWitness <thewitness@cacti.net>
0 commit comments