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 products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| fledge-iot | fledge | ≤ 3.1.0 | — |
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