/

CVE-2026-71284

Severity:

HIGH RISK

(7.2)

OS Command Injection (CWE-78) in Fledge Backup Uploads

CVE-2026-71284

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Arbitrary OS Command Execution

Severity:

HIGH RISK

(7.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Fledge's backup-restore upload handler constructs a shell command from an archive member filename without safely quoting it. An authenticated administrator who can upload a crafted backup archive may cause arbitrary operating-system commands to run with the service's privileges.

Affected context

The issue occurs in Fledge deployments that use the backup-restore upload functionality and process uploaded tar archives. Risk increases when an administrator or another user with equivalent upload permissions can submit an archive whose first member filename passes the handler's basic backup-name and extension checks, while still being interpreted by a shell.

Exploit preconditions

  • Attack surface: Backup-restore archive upload handling
  • Required access: Authenticated administrative access, or another permission set that allows backup uploads
  • Trigger point: Processing the first extracted tar member and copying it to the backup destination
  • Why exploitation is possible: The member filename is inserted into a command string and executed through os.system() without shell-safe quoting or argument separation

Why this happens

The handler treats a user-controlled archive member filename as data while embedding it directly into a shell command. Prefix and suffix validation checks naming conventions but do not establish that the value is safe for shell interpretation. Because os.system() invokes a shell and the command is assembled through string formatting, shell metacharacters and substitutions may alter command behavior. This is CWE-78: Improper Neutralization of Special Elements used in an OS Command, commonly known as OS command injection.

Potential impact

  • An attacker may execute arbitrary operating-system commands
  • The Fledge service account could be compromised
  • Backup data or application files could be modified, deleted, or exfiltrated
  • The host environment may be used for further lateral movement
  • Service availability and data integrity could be disrupted

General mitigation guidance

Mitigation generally centers on removing shell interpretation from file-copy operations and reducing trust in archive metadata.

Common defensive patterns include:

  • Use argument-list process APIs or dedicated file-copy functions instead of shell command strings
  • Apply context-appropriate validation to archive member names and destination paths
  • Treat archive metadata as untrusted input even when extensions and prefixes appear valid
  • Restrict archive extraction to expected directories and prevent path traversal
  • Run backup-restore operations with the minimum filesystem and operating-system privileges required
  • Enforce authorization, audit logging, and controlled access for backup uploads

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis rules identifying os.system() or shell-spawning APIs fed by archive metadata, filenames, or request parameters
  • Code review checks for string formatting or concatenation used to construct operating-system commands
  • Review signals showing missing argument separation, shell quoting, or dedicated filesystem APIs
  • Tests that submit filenames containing shell-sensitive characters and verify they remain inert
  • Runtime monitoring for unexpected child processes launched by the Fledge service
  • Policy enforcement that prohibits shell command construction from untrusted input

Sources

SourceLink
github.comgithub.com/fledge-iot/fledge
github.comgithub.com/fledge-iot/fledge/blob/main/python/fledge/services/core/api/backup_restore.py

Frequently asked

questions

Exploitability depends on how Fledge is exposed and configured. An attacker generally needs access to the backup-restore upload endpoint and sufficient permissions to submit an archive.

The described attack requires an administrator or another authorized principal with backup-upload capability. The practical scope depends on the deployment's authentication and authorization controls.

Avoid invoking a shell for file-copy operations. Use APIs that pass arguments separately or perform the copy directly, and validate archive paths against a strict expected format.

Treat archive names and metadata as untrusted, apply least privilege, review all process-spawning code, and enforce automated checks that flag shell command construction from user-controlled values.

Find out what's already
exploitable in your codebase.