{"record":{"id":"d78b099a3875d000","repo":"projectdiscovery/nuclei","slug":"dialers-not-initialized-for-s-d78b09","errorCode":null,"errorMessage":"dialers not initialized for %s","messagePattern":"dialers not initialized for (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/js/libs/kerberos/sendtokdc.go","lineNumber":73,"sourceCode":"\t\t// if it related to udp\n\t\tbin, err := CheckKrbError(response)\n\t\tif err == nil {\n\t\t\treturn string(bin), nil\n\t\t}\n\t}\n\treturn string(response), err\n}\n\n// sendToKDCTcp sends a message to the KDC via TCP.\nfunc sendToKDCTcp(kclient *Client, msg string) ([]byte, error) {\n\t_, kdcs, err := kclient.Krb5Config.GetKDCs(kclient.Realm, true)\n\tkclient.nj.HandleError(err, \"error getting KDCs\")\n\tkclient.nj.Require(len(kdcs) > 0, \"no KDCs found\")\n\n\texecutionId := kclient.nj.ExecutionId()\n\tdialers := protocolstate.GetDialersWithId(executionId)\n\tif dialers == nil {\n\t\treturn nil, fmt.Errorf(\"dialers not initialized for %s\", executionId)\n\t}\n\n\tdialCtx := kclient.nj.Context()\n\tvar errs []string\n\tfor i := 1; i <= len(kdcs); i++ {\n\t\thost, port, err := net.SplitHostPort(kdcs[i])\n\t\tif err == nil && kclient.config.ip != \"\" {\n\t\t\t// use that ip address instead of realm/domain for resolving\n\t\t\thost = kclient.config.ip\n\t\t}\n\t\ttcpConn, err := dialers.Fastdialer.Dial(dialCtx, \"tcp\", net.JoinHostPort(host, port))\n\t\tif err != nil {\n\t\t\terrs = append(errs, fmt.Sprintf(\"error establishing connection to %s: %v\", kdcs[i], err))\n\t\t\tcontinue\n\t\t}\n\t\tdefer func() {\n\t\t\t_ = tcpConn.Close()\n\t\t}()","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/js/libs/kerberos/sendtokdc.go#L55-L91","documentation":"All kerberos KDC traffic is routed through per-execution dialers held in protocolstate (fastdialer plus connection history). GetDialersWithId(executionId) returned nil, meaning no dialers were ever initialized for this execution ID, so the TCP send path aborts before any network I/O happens.","triggerScenarios":"Invoking the kerberos library from a standalone goja runtime or unit test where protocolstate was never set up; calling SendToKDC after the scan execution context was torn down; caching a Client across separate scan executions and reusing it later.","commonSituations":"Embedding nuclei via lib/nuclei and running JS libs before engine initialization; long-lived scripts that outlive their execution ID; tests that construct the client directly instead of running through the engine.","solutions":["Run the template through the nuclei engine so protocolstate dialers are created at execution start","When embedding via lib/nuclei, ensure the executor/engine is initialized before any JavaScript library call","Do not cache Client instances or defer SendToKDC calls beyond the lifetime of one execution"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const resp = kerberos.SendToKDC(client, msg);\n} catch (e) {\n  // dialers missing for this execution: run inside a nuclei scan execution, do not cache clients across runs\n}","preventionTips":["Run kerberos library calls only inside a live nuclei scan execution","When embedding via lib/nuclei, initialize the engine before executing JS templates","Keep client creation and SendToKDC within one execution lifetime"],"tags":["kerberos","runtime","initialization","network"],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}