The `secure popen()` function in `glances/secure.py` improperly interprets shell-like operators, specifically `>` (file redirection), `|` (pipe), and `&&` (command chaining), within command strings. When Application Monitoring Process (AMP) modules load `command` or `service cmd` configuration values from `glances.conf`, these values are passed to `secure popen()` without sanitization. This allows an attacker who can modify the configuration file to write arbitrary content to any filesystem path, chain arbitrary commands, or pipe output to other programs.
Technical details include:
- **Vulnerable Function**: `secure popen()` parses the `>` operator to write to files via `open(stdout redirect, "w")` without path validation, and uses `|` and `&&` to execute sequential or piped processes.
- **Vulnerable Parameters**: The `command` and `service cmd` configuration values loaded from `[amp <name>]` and `[amp systemv]` sections.
The `--disable-config-exec` flag does not mitigate this issue as it only prevents backtick execution in `config.get value()` and does not affect how `secure popen()` processes the resulting strings.