{"record":{"id":"dc1ab869c1f392ac","repo":"projectdiscovery/nuclei","slug":"invalid-attack-type-s","errorCode":null,"errorMessage":"invalid attack type: %s","messagePattern":"invalid attack type: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/protocols/common/generators/attack-types.go","lineNumber":48,"sourceCode":null,"sourceCodeStart":null,"sourceCodeEnd":null,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/protocols/common/generators/attack-types.go#L48","documentation":"Raised by toAttackType when a fuzzing attack type string, after TrimSpace + ToLower, is not one of attackTypeMappings: 'batteringram', 'pitchfork' or 'clusterbomb' (attack_types.go:27-31,48). It surfaces either directly from AttackTypeHolder.UnmarshalYAML/UnmarshalJSON when a template's fuzzing attack field is invalid, or wrapped as 'could not parse custom attack-type' when a generator is created with a custom attack type in generators.go.","triggerScenarios":"A fuzz block with attack: sniper (Metasploit-style name), attack: cluster bomb, or attack: BatteringRam is fine but attack: ram is not; a SDK caller passing an arbitrary string to the generator's custom attack type.","commonSituations":"Porting fuzz configs from wfuzz/ffuf/Burp vocabulary; typos and spaces in the attack name; templates written against forks with extra attack modes.","solutions":["Use one of: batteringram, pitchfork, clusterbomb","Remember the value is case-insensitive but must be a single word ('clusterbomb', not 'cluster bomb')","Validate fuzzing templates with nuclei -validate before a campaign"],"exampleFix":"# before\nattack: sniper\n# after\nattack: batteringram","handlingStrategy":"validation","validationCode":"var validAttackTypes = map[string]bool{\"batteringram\": true, \"pitchfork\": true, \"clusterbomb\": true}\nfunc attackTypeOK(s string) bool { return validAttackTypes[strings.ToLower(strings.TrimSpace(s))] }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Translate foreign vocab (sniper->batteringram, pitch fork->pitchfork) in template preprocessing","Validate fuzz blocks with nuclei -validate"],"tags":["fuzzing","payloads","template","validation"],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}