{"record":{"id":"3d83218b7381fe7e","repo":"projectdiscovery/nuclei","slug":"headless-host-concurrency-must-be-at-least-1","errorCode":null,"errorMessage":"headless host concurrency must be at least 1","messagePattern":"headless host concurrency must be at least 1","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/config.go","lineNumber":139,"sourceCode":"\tHeadlessHostConcurrency       int // number of hosts to scan concurrently for headless templates  (per template in template-spray mode)\n\tHeadlessTemplateConcurrency   int // number of templates to run concurrently for headless templates (per host in host-spray mode)\n\tJavascriptTemplateConcurrency int // number of templates to run concurrently for javascript templates (per host in host-spray mode)\n\tTemplatePayloadConcurrency    int // max concurrent payloads to run for a template (a good default is 25)\n\tProbeConcurrency              int // max concurrent http probes to run (a good default is 50)\n}\n\n// WithConcurrency sets concurrency options\nfunc WithConcurrency(opts Concurrency) NucleiSDKOptions {\n\treturn func(e *NucleiEngine) error {\n\t\t// minimum required is 1\n\t\tif opts.TemplateConcurrency <= 0 {\n\t\t\treturn errors.New(\"template threads must be at least 1\")\n\t\t}\n\t\tif opts.HostConcurrency <= 0 {\n\t\t\treturn errors.New(\"host concurrency must be at least 1\")\n\t\t}\n\t\tif opts.HeadlessHostConcurrency <= 0 {\n\t\t\treturn errors.New(\"headless host concurrency must be at least 1\")\n\t\t}\n\t\tif opts.HeadlessTemplateConcurrency <= 0 {\n\t\t\treturn errors.New(\"headless template threads must be at least 1\")\n\t\t}\n\t\tif opts.JavascriptTemplateConcurrency <= 0 {\n\t\t\treturn errors.New(\"js must be at least 1\")\n\t\t}\n\t\tif opts.TemplatePayloadConcurrency <= 0 {\n\t\t\treturn errors.New(\"payload concurrency must be at least 1\")\n\t\t}\n\t\tif opts.ProbeConcurrency <= 0 {\n\t\t\treturn errors.New(\"probe concurrency must be at least 1\")\n\t\t}\n\t\te.opts.TemplateThreads = opts.TemplateConcurrency\n\t\te.opts.BulkSize = opts.HostConcurrency\n\t\te.opts.HeadlessBulkSize = opts.HeadlessHostConcurrency\n\t\te.opts.HeadlessTemplateThreads = opts.HeadlessTemplateConcurrency\n\t\te.opts.JsConcurrency = opts.JavascriptTemplateConcurrency","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/lib/config.go#L121-L157","documentation":"parseUNC normalizes backslashes to slashes, drops empty segments, and requires at least two components (host, share). A UNC path naming only a server - or nothing at all - cannot identify a share, so parsing aborts with this error.","triggerScenarios":"\\\\server or //server with no share segment; a bare double-backslash path that yields zero components after cleaning.","commonSituations":"Truncated copy-paste of UNC paths; forgetting the share name when hand-typing targets.","solutions":["Complete the path to \\\\server\\share or \\\\server\\share\\file.txt","Confirm the share name exists (smbclient -L server, net view) before scanning"],"exampleFix":"# before\n\\\\fileserver\n# after\n\\\\fileserver\\public\\report.pdf","handlingStrategy":"validation","validationCode":"import \"strings\"\n\nfunc uncHasHostAndShare(raw string) bool {\n    s := strings.ReplaceAll(raw, \"\\\\\", \"/\")\n    s = strings.TrimPrefix(s, \"//\")\n    n := 0\n    for _, p := range strings.Split(s, \"/\") {\n        if p != \"\" {\n            n++\n        }\n    }\n    return n >= 2\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always specify host and share at minimum","Verify share names with smbclient -L before scanning"],"tags":["smb","unc","path","parsing"],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}