Skip to content

[SECURITY] Shell command injection potential in BackgroundTaskRuntime #126

@Livezt

Description

@Livezt

Security Bug: Shell Command Injection

File: src/task/runtime/BackgroundTaskRuntime.ts lines 100-105

child = this.options.spawn(spec.command, {
  shell: true,  // No validation
  detached: true,
});

Security Impact:

  • Arbitrary shell command execution via user-controlled input
  • CVSS ~8.1 (High)

Recommended Fix:
Use array form of spawn without shell:

child = this.options.spawn(command, args, { shell: false });
// Validate command against allowlist

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions