Skip to content

fix(cli): CLI command injection via exec() in github.ts (CWE-78) #17350

Description

@kvenux

Bug Report

Description: packages/opencode/src/cli/cmd/github.ts:330-337 uses exec() with string interpolation to open URLs in the browser. Since exec() spawns a shell, any shell metacharacters in the URL would be interpreted, enabling OS command injection.
CWE: CWE-78
Severity: Medium (currently hardcoded URL, but pattern is unsafe if URL becomes dynamic)
Reproduction: See POC test in PR

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions