Files
codeql/go/ql/test/query-tests/Security/CWE-078/CommandInjection.go
2022-05-20 10:07:19 -07:00

13 lines
164 B
Go

package main
import (
"net/http"
"os/exec"
)
func handler(req *http.Request) {
cmdName := req.URL.Query()["cmd"][0]
cmd := exec.Command(cmdName)
cmd.Run()
}