{"record":{"id":"2ed270289260a8a6","repo":"owasp-amass/amass","slug":"unable-to-load-the-file-in-the-bruteforce-wordlist","errorCode":null,"errorMessage":"unable to load the file in the bruteforce wordlist_file setting: %s: %v","messagePattern":"unable to load the file in the bruteforce wordlist_file setting: (.+?): (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"config/brute.go","lineNumber":53,"sourceCode":"\t\twordlistPaths, ok := wordlistPathRaw.([]interface{})\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"bruteforce wordlist_file is not an array\")\n\t\t}\n\n\t\tfor _, wordlistPathRaw := range wordlistPaths {\n\t\t\twordlistPath, ok := wordlistPathRaw.(string)\n\t\t\tif !ok {\n\t\t\t\treturn fmt.Errorf(\"bruteforce wordlist_file item is not a string\")\n\t\t\t}\n\n\t\t\tabsPath, err := c.AbsPathFromConfigDir(wordlistPath)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"failed to get absolute path for wordlist file: %w\", err)\n\t\t\t}\n\n\t\t\twordlist, err := GetListFromFile(absPath)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"unable to load the file in the bruteforce wordlist_file setting: %s: %v\", absPath, err)\n\t\t\t}\n\n\t\t\tc.Wordlist = append(c.Wordlist, wordlist...)\n\t\t}\n\t}\n\n\tc.Wordlist = stringset.Deduplicate(c.Wordlist)\n\treturn nil\n}\n\nfunc (c *Config) loadAlterationSettings(cfg *Config) error {\n\talterationsRaw, ok := c.Options[\"alterations\"]\n\tif !ok {\n\t\treturn nil\n\t}\n\n\talterations, ok := alterationsRaw.(map[string]interface{})\n\tif !ok {","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/owasp-amass/amass/blob/79299dce87b0085db0f2f4ef3e9c52cccb49f514/config/brute.go#L35-L71","documentation":"In loadBruteForceSettings, after resolving the wordlist path, the file is read line-by-line with GetListFromFile. If that fails, the error is wrapped in this message including the absolute path and underlying error. It means the wordlist file referenced by the bruteforce config could not be opened or read.","triggerScenarios":"bruteforce.wordlists contains a path (after resolution) where GetListFromFile fails — the file does not exist, is a directory, or is not readable by the process.","commonSituations":"Typo'd or stale wordlist paths after moving files; missing OS wordlist packages (e.g. /usr/share/wordlists not installed); permission issues reading a wordlist owned by root; passing a directory instead of a file.","solutions":["Verify the file exists at the reported absolute path (ls / stat) and fix the path in the config","Check file permissions so the running user can read the wordlist","Install or restore the missing wordlist package/file","Point the entry to a file, not a directory, and pre-test with GetListFromFile before loading the config"],"exampleFix":"// before\n\"wordlists\": []interface{}{\"/usr/share/wordlists/dirbuster-list.txt\"} // file missing\n\n// after\n// verify first: os.Stat the path; then\n\"wordlists\": []interface{}{\"/usr/share/wordlists/dirb/common.txt\"}","handlingStrategy":"validation","validationCode":"func ensureWordlistReadable(path string) error {\n\tfi, err := os.Stat(path)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"wordlist %s: %w\", path, err)\n\t}\n\tif fi.IsDir() {\n\t\treturn fmt.Errorf(\"wordlist %s is a directory\", path)\n\t}\n\tf, err := os.Open(path)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"wordlist %s not readable: %w\", path, err)\n\t}\n\treturn f.Close()\n}","typeGuard":"func isReadableFile(p string) bool {\n\tfi, err := os.Stat(p)\n\treturn err == nil && !fi.IsDir()\n}","tryCatchPattern":"if err := cfg.LoadSettings(); err != nil {\n\tif strings.Contains(err.Error(), \"unable to load the file in the bruteforce wordlist_file setting\") {\n\t\t// stat/open the reported path, fix it, then retry\n\t}\n\tlog.Fatal(err)\n}","preventionTips":["Stat every wordlist path before adding it to the config","Install the OS wordlist packages your configs reference (e.g. wordlists packages on Kali)","Check file permissions when running as a non-root user","Point entries at files, never directories, and re-verify paths after moving data"],"tags":["go","config","file","wordlist"],"backgroundTag":"file-read-failed","analyzedSha":"79299dce87b0085db0f2f4ef3e9c52cccb49f514","analyzedAt":"2026-09-06T08:22:48.198Z","contentChangedAt":"2026-09-06T08:22:48.198Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}