{"record":{"id":"848b1b5108831d7e","repo":"projectdiscovery/nuclei","slug":"unsupported-goexec-output-method","errorCode":null,"errorMessage":"unsupported goexec output method","messagePattern":"unsupported goexec output method","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/js/libs/goexec/errors.go","lineNumber":14,"sourceCode":"package goexec\n\nimport \"errors\"\n\nvar (\n\tErrMissingAuth             = errors.New(\"goexec auth is required\")\n\tErrMissingUsername         = errors.New(\"goexec username is required for this auth mode\")\n\tErrMultipleCredentialModes = errors.New(\"goexec auth selects multiple primary credential modes\")\n\tErrMissingTarget           = errors.New(\"goexec target is required\")\n\tErrMissingCommand          = errors.New(\"goexec command is required\")\n\tErrMissingExecutable       = errors.New(\"goexec executable is required\")\n\tErrUnsupportedModule       = errors.New(\"unsupported goexec module\")\n\tErrUnsupportedMethod       = errors.New(\"unsupported goexec method\")\n\tErrUnsupportedOutputMethod = errors.New(\"unsupported goexec output method\")\n\tErrNetworkPolicyDenied     = errors.New(\"target denied by network policy\")\n\tErrInvalidMethodArguments  = errors.New(\"invalid goexec method arguments\")\n\tErrDomainControllerDenied  = errors.New(\"domain controller denied by network policy\")\n\tErrProxyDenied             = errors.New(\"proxy denied by network policy\")\n\tErrEndpointDenied          = errors.New(\"endpoint denied by network policy\")\n)\n","sourceCodeStart":1,"sourceCodeEnd":21,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/js/libs/goexec/errors.go#L1-L21","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Omit output-method entirely and keep output: true to use the built-in file-based collection","Set output-method to the package default value (goexec.DefaultOutputMethod) explicitly","Drop options.output if no output collection is needed"],"exampleFix":"// before\noptions: {output: true, output-method: 'smb'}\n// after\noptions: {output: true}","handlingStrategy":"validation","validationCode":"if req.Options.Output && req.Options.OutputMethod != \"\" && req.Options.OutputMethod != goexec.DefaultOutputMethod {\n    return fmt.Errorf(\"output-method must be empty or %s\", goexec.DefaultOutputMethod)\n}","typeGuard":"func isUnsupportedOutputMethod(err error) bool { return errors.Is(err, goexec.ErrUnsupportedOutputMethod) }","tryCatchPattern":null,"preventionTips":["Never emit an output-method value; the built-in file collection is the only implementation","Document that output:true alone is sufficient"],"tags":["goexec","remote-execution","code-protocol","validation"],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}