projectdiscovery/nuclei · error

unsupported goexec output method

Error message

unsupported goexec output method

What it means

Sentinel error from the goexec helper. Output collection is requested via options.output, and executionIO() only implements one built-in output method: write the process output to C:\Windows\Temp, fetch it over SMB from the ADMIN$ share, then optionally delete it (adapter_goexec.go:308-337). If options.output is true AND options.output_method is set to anything other than the empty string or the package default (goexec.DefaultOutputMethod), the request is rejected with ErrUnsupportedOutputMethod.

Source

Thrown at pkg/js/libs/goexec/errors.go:14

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

  1. Omit output-method entirely and keep output: true to use the built-in file-based collection
  2. Set output-method to the package default value (goexec.DefaultOutputMethod) explicitly
  3. Drop options.output if no output collection is needed

Example fix

// before
options: {output: true, output-method: 'smb'}
// after
options: {output: true}
Defensive patterns

Strategy: validation

Validate before calling

if req.Options.Output && req.Options.OutputMethod != "" && req.Options.OutputMethod != goexec.DefaultOutputMethod {
    return fmt.Errorf("output-method must be empty or %s", goexec.DefaultOutputMethod)
}

Type guard

func isUnsupportedOutputMethod(err error) bool { return errors.Is(err, goexec.ErrUnsupportedOutputMethod) }

Prevention

When it happens

Trigger: A goexec request with options: {output: true, output-method: 'smb'} or output-method: 'stdout'; any non-default output-method value reaches adapter_goexec.go:311-313.

Common situations: Template author assumes named output transports exist (like other tools' 'output-method' knobs); copy-paste from a draft spec; upstream adds a new method name not yet in the installed nuclei version.

Related errors


AI-assisted analysis of projectdiscovery/nuclei@265b3a3dec (2026-08-15). Data as JSON: /api/errors/848b1b5108831d7e. Report an issue: GitHub.