projectdiscovery/nuclei · error
invalid signature type:
Error message
invalid signature type:
What it means
The `signature:` field on an HTTP request is mapped by toSignatureType (trim + case-normalize) against the signatureTypeMappings table. Currently the only supported value is "AWS" (AWS Signature Version 4 signing via the signer package); any other string fails template compilation with this error.
Source
Thrown at pkg/protocols/http/signature.go:42
AWSSignature: "AWS",
}
func GetSupportedSignaturesTypes() []SignatureType {
var result []SignatureType
for index := SignatureType(1); index < signatureLimit; index++ {
result = append(result, index)
}
return result
}
func toSignatureType(valueToMap string) (SignatureType, error) {
normalizedValue := normalizeValue(valueToMap)
for key, currentValue := range signatureTypeMappings {
if normalizedValue == currentValue {
return key, nil
}
}
return -1, errors.New("invalid signature type: " + valueToMap)
}
func (t SignatureType) String() string {
return signatureTypeMappings[t]
}
// SignatureTypeHolder is used to hold internal type of the signature
type SignatureTypeHolder struct {
Value SignatureType
}
func (holder SignatureTypeHolder) JSONSchema() *jsonschema.Schema {
gotType := &jsonschema.Schema{
Type: "string",
Title: "type of the signature",
Description: "Type of the signature",
}
for _, types := range GetSupportedSignaturesTypes() {View on GitHub (pinned to 265b3a3dec)
Solutions
- Use `signature: AWS` for AWS Signature V4 signing, or remove the signature field entirely
- For other auth schemes use the dedicated auth fields (bearer-token, basic auth) or headers
- Validate the template with nuclei -validate
Example fix
# before
http:
- raw:
- |
GET / HTTP/1.1
signature: AWS4
# after
http:
- raw:
- |
GET / HTTP/1.1
signature: AWS Defensive patterns
Strategy: type-guard
Type guard
func isValidSignatureType(v string) bool {
return strings.ToUpper(strings.TrimSpace(v)) == "AWS" // only supported value today
} Prevention
- Use `signature: AWS` only — it is currently the single supported scheme (SigV4)
- Consult GetSupportedSignaturesTypes() when enumerating allowed values programmatically
- For other auth schemes, use bearer/basic auth fields or raw headers instead of signature:
When it happens
Trigger: Setting `signature:` to an unsupported scheme such as `signature: HMAC`, `signature: BASIC`, or a near-miss like `signature: AWS4` / `signature: SigV4`. Only `signature: AWS` (any casing) is accepted.
Common situations: Assuming multiple auth-signing schemes exist; copying doc examples for other tools; guessing the identifier for SigV4.
Related errors
- Invalid HTTP method verb: %s
- probe concurrency must be at least 1
- response read size must be non-negative
- empty filename
- Invalid action type: %s
AI-assisted analysis of projectdiscovery/nuclei@265b3a3dec (2026-08-15).
Data as JSON: /api/errors/e1e15edfd2634552.
Report an issue: GitHub.