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.
Published: 2026-08-05
Score: 7.2 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability is in Fledge’s backup‑restore upload handler, where the filename of the first extracted tar member is inserted into a shell command using string formatting without quoting or escaping. Because os.system invokes a shell, an attacker who can upload a backup archive can construct a filename that causes the shell to execute arbitrary commands. This flaw permits arbitrary operating system command execution on the host where the Fledge process runs.

Affected Systems

This flaw affects the Fledge IoT Gateway product, specifically the backup_restore.py component of the core API. All installations that have not applied the latest patches and that allow administrators to upload backup archives are vulnerable. The affected version range is not specified in the provided data, so any version prior to a fix should be considered at risk.

Risk and Exploitability

The CVSS score of 7.2 indicates a high impact, while the EPSS score of <1% suggests a low probability of exploitation at the moment. The flaw is not currently listed in CISA’s KEV catalog. Successful exploitation requires an attacker who has administrative privileges to upload a backup archive; users lacking such privileges cannot use the feature to execute commands. Once an authenticated administrator uploads a malicious archive, the attacker can run arbitrary commands as the Fledge process user.

Generated by OpenCVE AI on August 10, 2026 at 21:21 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Acquire and install the latest Fledge release that eliminates the insecure shell usage in backup_restore.py.
  • Restrict backup upload capability to trusted administrators and disable the backup feature if not necessary in the environment.
  • Modify the backup_restore.py code to use secure file copying methods such as shutil.copy or subprocess.run with a list argument, and apply explicit filename sanitization to prevent shell interpretation.

Generated by OpenCVE AI on August 10, 2026 at 21:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 10 Aug 2026 12:00:00 +0000

Type Values Removed Values Added
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: `cmd = "cp {} {}".format(source, backup_path); ret_code = os.system(cmd)`. The only pre-check on the filename is a prefix/suffix match (startswith(backup_prefix), endswith(valid_extensions)), which a name such as `fledge_backup_$(id>/tmp/pwn).db` satisfies while still injecting a shell command substitution. 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. 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.
Title Fledge IoT Gateway - Backup Restore OS Command Injection via Tar Member Filename Fledge IoT Gateway Backup Restore OS Command Injection via Tar Member Filename

Mon, 10 Aug 2026 11:45:00 +0000

Type Values Removed Values Added
Title Fledge IoT Gateway Backup Restore OS Command Injection via Tar Member Filename Fledge IoT Gateway - Backup Restore OS Command Injection via Tar Member Filename

Fri, 07 Aug 2026 10:30:00 +0000

Type Values Removed Values Added
First Time appeared Fledge-iot
Fledge-iot fledge
Vendors & Products Fledge-iot
Fledge-iot fledge

Wed, 05 Aug 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Wed, 05 Aug 2026 13:15:00 +0000

Type Values Removed Values Added
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: `cmd = "cp {} {}".format(source, backup_path); ret_code = os.system(cmd)`. The only pre-check on the filename is a prefix/suffix match (startswith(backup_prefix), endswith(valid_extensions)), which a name such as `fledge_backup_$(id>/tmp/pwn).db` satisfies while still injecting a shell command substitution. 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.
Title Fledge IoT Gateway Backup Restore OS Command Injection via Tar Member Filename
Weaknesses CWE-78
References
Metrics cvssV3_1

{'score': 7.2, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H'}


Subscriptions

Fledge-iot Fledge
cve-icon MITRE

Status: PUBLISHED

Assigner: TuranSec

Published:

Updated: 2026-08-10T11:47:10.756Z

Reserved: 2026-08-05T12:23:34.968Z

Link: CVE-2026-71284

cve-icon Vulnrichment

Updated: 2026-08-05T15:52:38.812Z

cve-icon NVD

Status : Deferred

Published: 2026-08-05T13:24:53.093

Modified: 2026-08-26T17:13:24.800

Link: CVE-2026-71284

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-10T21:30:04Z

Weaknesses
  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')