projectdiscovery/nuclei · error

payload concurrency must be at least 1

Error message

payload concurrency must be at least 1

What it means

After marker replacement, getActionArg renders the argument through render.Render with the page's variables. A DSL expression that fails to parse or evaluate - unknown helper, wrong arity, unbalanced braces - makes Render return an error, wrapped here with the argument name. It is effectively a template expression error surfaced at headless execution time.

Source

Thrown at lib/config.go:148

	return func(e *NucleiEngine) error {
		// minimum required is 1
		if opts.TemplateConcurrency <= 0 {
			return errors.New("template threads must be at least 1")
		}
		if opts.HostConcurrency <= 0 {
			return errors.New("host concurrency must be at least 1")
		}
		if opts.HeadlessHostConcurrency <= 0 {
			return errors.New("headless host concurrency must be at least 1")
		}
		if opts.HeadlessTemplateConcurrency <= 0 {
			return errors.New("headless template threads must be at least 1")
		}
		if opts.JavascriptTemplateConcurrency <= 0 {
			return errors.New("js must be at least 1")
		}
		if opts.TemplatePayloadConcurrency <= 0 {
			return errors.New("payload concurrency must be at least 1")
		}
		if opts.ProbeConcurrency <= 0 {
			return errors.New("probe concurrency must be at least 1")
		}
		e.opts.TemplateThreads = opts.TemplateConcurrency
		e.opts.BulkSize = opts.HostConcurrency
		e.opts.HeadlessBulkSize = opts.HeadlessHostConcurrency
		e.opts.HeadlessTemplateThreads = opts.HeadlessTemplateConcurrency
		e.opts.JsConcurrency = opts.JavascriptTemplateConcurrency
		e.opts.PayloadConcurrency = opts.TemplatePayloadConcurrency
		e.opts.ProbeConcurrency = opts.ProbeConcurrency
		return nil
	}
}

// WithResponseReadSize sets the maximum size of response to read in bytes.
// A value of 0 means no limit. Recommended values: 1MB (1048576) to 10MB (10485760).
func WithResponseReadSize(responseReadSize int) NucleiSDKOptions {

View on GitHub (pinned to 265b3a3dec)

Solutions

  1. Run nuclei -validate -t template.yaml - it catches many expression errors
  2. Check helper names and arity against nuclei's DSL function list
  3. Make sure every variable used in the argument is defined earlier in the template or action chain
  4. Fix quoting so the expression survives YAML parsing intact

Example fix

# before
value: "{{base6(payload)}}"
# after
value: "{{base64(payload)}}"
Defensive patterns

Strategy: validation

Validate before calling

import "github.com/projectdiscovery/nuclei/v3/pkg/protocols/common/expressions"

func expressionOK(expr string, values map[string]interface{}) error {
    if err := expressions.ContainsUnresolvedVariables(expr); err != nil {
        return err
    }
    _, err := expressions.Evaluate(expr, values)
    return err
}

Prevention

When it happens

Trigger: Action arguments using an undefined helper ({{base6(...)}} instead of {{base64(...)}}), a helper with the wrong argument count, or a reference to a variable never set earlier in the action chain.

Common situations: Authoring headless templates with DSL in args; nuclei upgrades renaming or removing helpers; copying expressions from HTTP sections into headless args.

Related errors


AI-assisted analysis of projectdiscovery/nuclei@265b3a3dec (2026-08-15). Data as JSON: /api/errors/a3a32142023ee223. Report an issue: GitHub.