7.2high
Fledge IoT Gateway Backup Restore OS Command Injection via Tar Member Filename
- Severity
- 7.2high CVSS:3.1 by TuranSec
- Exploit likelihood
- 0.92% (higher than 58% of CVEs)
- Published
- Last changed
- Assigned by
- TuranSec
Description
Fledge's backup-restore upload handler, upload_backup (python/fledge/services/core/api/backup_restore.py), takes the first extracted tar member's filename (tar_file_names[0]) and builds a shell command via string formatting. Because os.system invokes a shell and no quoting (shlex.quote, list-form subprocess) is applied, an admin uploading a crafted backup archive achieves arbitrary OS command execution.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| fledge-iot fledge | up to 3.1.0 | CVE List |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
Fledge's backup-restore upload handler, upload_backup (python/fledge/services/core/api/backup_restore.py), takes the first extracted tar member's filename (tar_file_names[0]) and builds a shell command via string formatting. Because os.system invokes a shell and no quoting (shlex.quote, list-form subprocess) is applied, an admin uploading a crafted backup archive achieves arbitrary OS command execution.
NVD (es)
El gestor de carga de copia de seguridad y restauración de Fledge, upload_backup() (python/fledge/services/core/api/backup_restore.py), toma el nombre de archivo del primer miembro tar extraído (tar_file_names[0]) y construye un comando de shell mediante formato de cadena: ’cmd = “cp {} {}”.format(source, backup_path); ret_code = os.system(cmd)’. La única verificación previa en el nombre de archivo es una coincidencia de prefijo/sufijo (startswith(backup_prefix), endswith(valid_extensions)), que un nombre como ’fledge_backup_$(id>/tmp/pwn).db’ satisface mientras sigue inyectando una sustitución de comando de shell. Debido a que os.system() invoca un shell y no se aplica ningún tipo de entrecomillado (shlex.quote, subprocess en formato de lista), un administrador que carga un archivo de copia de seguridad manipulado logra la ejecución arbitraria de comandos del sistema operativo.
References
| https://github.com/fledge-iot/fledge | third-party-advisory | |
| https://github.com/fledge-iot/fledge/blob/main/python/fledge/services/core/api/backup_restore.py | third-party-advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-71284 changed 2026-08-10 | CVE Terms of Use |
| NVD | CVE-2026-71284 changed 2026-10-23 | Public domain |