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

Impact

The vulnerability resides in Fledge’s backup‑restore upload handler, where the filename of the first extracted tar member is inserted directly into a shell command without proper sanitization. A specially crafted file name such as "fledge_backup_$(id>/tmp/pwn).db" satisfies the weak prefix/suffix checks yet injects a shell substitution. Executing the command via os.system() allows an attacker to run arbitrary OS commands as the user the Fledge process runs under, leading to full compromise of the host system.

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 EPSS data is not available, implying no known exploitation trend at the time of this analysis. The flaw is not listed in CISA’s KEV catalog. The attack likely requires an authenticated administrator with upload privileges; the vulnerability is not exploitable by unauthenticated or remote users unless they can trick an admin into uploading a malicious archive. Once a privileged user uploads such an archive, arbitrary command execution can be achieved with no additional prerequisites.

Generated by OpenCVE AI on August 5, 2026 at 15:11 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 (e.g., reject or escape characters like $, », |, &).

Generated by OpenCVE AI on August 5, 2026 at 15:11 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

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

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: TuranSec

Published:

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

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

Link: CVE-2026-71284

cve-icon Vulnrichment

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

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-05T15:15:05Z

Weaknesses
  • CWE-78

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