projectdiscovery/nuclei · error
unsupported goexec method
Error message
unsupported goexec method
What it means
Sentinel error from the goexec (Windows remote execution) helper library. The GoExecRunner dispatches each module with a per-module method switch: wmi accepts 'command', 'proc' and 'call'; tsch accepts 'demand' and 'create'; dcom accepts only 'mmc'; scmr has no method switch. When req.Method (lowercased, no trim) matches none of the selected module's cases, the runner returns ErrUnsupportedMethod (adapter_goexec.go:136,178,207). The error is stored on the JS result object (result.Error, OK=false) rather than propagated to the JS runtime as an exception.
Source
Thrown at pkg/js/libs/goexec/errors.go:13
package goexec
import "errors"
var (
ErrMissingAuth = errors.New("goexec auth is required")
ErrMissingUsername = errors.New("goexec username is required for this auth mode")
ErrMultipleCredentialModes = errors.New("goexec auth selects multiple primary credential modes")
ErrMissingTarget = errors.New("goexec target is required")
ErrMissingCommand = errors.New("goexec command is required")
ErrMissingExecutable = errors.New("goexec executable is required")
ErrUnsupportedModule = errors.New("unsupported goexec module")
ErrUnsupportedMethod = errors.New("unsupported goexec method")
ErrUnsupportedOutputMethod = errors.New("unsupported goexec output method")
ErrNetworkPolicyDenied = errors.New("target denied by network policy")
ErrInvalidMethodArguments = errors.New("invalid goexec method arguments")
ErrDomainControllerDenied = errors.New("domain controller denied by network policy")
ErrProxyDenied = errors.New("proxy denied by network policy")
ErrEndpointDenied = errors.New("endpoint denied by network policy")
)
View on GitHub (pinned to 265b3a3dec)
Solutions
- Set method to a value supported by the chosen module: wmi -> command | proc | call, tsch -> demand | create, dcom -> mmc
- Check spelling; matching lowercases the value but does not trim whitespace, so remove leading/trailing spaces
- Align the template with the goexec helper documentation shipped for your nuclei version
Example fix
// before (js template)
return goexec.Run({target: t, module: 'dcom', method: 'wmiexec', ...});
// after
return goexec.Run({target: t, module: 'dcom', method: 'mmc', ...}); Defensive patterns
Strategy: validation
Validate before calling
var goexecMethods = map[string][]string{
"wmi": {"command", "proc", "call"},
"tsch": {"demand", "create"},
"dcom": {"mmc"},
}
func methodSupported(module, method string) bool {
for _, m := range goexecMethods[strings.ToLower(module)] {
if m == strings.ToLower(method) {
return true
}
}
return false
} Type guard
func isUnsupportedMethod(err error) bool { return errors.Is(err, goexec.ErrUnsupportedMethod) } Try / catch
res, err := goexec.Run(req)
if err == nil && res != nil && errors.Is(res.Err, goexec.ErrUnsupportedMethod) { /* adjust method and retry once */ } Prevention
- Keep a module->methods table next to template generation code
- Lint goexec requests for unknown methods before submission
- Pin template packs to the nuclei version they were written for
When it happens
Trigger: A code-protocol goexec call with Module='wmi' and Method='query' (not command/proc/call); Module='dcom' with any method except 'mmc'; Module='tsch' with Method='run' instead of demand/create.
Common situations: Template author copies a method name from a different module's docs; typo in the method field; nuclei version where a module's supported method set changed and the template was not updated.
Related errors
- unsupported goexec output method
- invalid goexec method arguments
- invalid goexec method arguments: %w
- validation failed for these fields
- no input provider found
AI-assisted analysis of projectdiscovery/nuclei@265b3a3dec (2026-08-15).
Data as JSON: /api/errors/9cd5faa55334ce94.
Report an issue: GitHub.