Skip to content

Keeping Templates Updated

The engine barely changes what nuclei knows; the templates are what it knows. A nuclei installed in January and never updated scans, forever, with January's knowledge — blind to every check written since, including the ones for vulnerabilities disclosed in February. Keeping the collection current is therefore not housekeeping. It is most of the point.

The two commands

$ nuclei -tv
[INF] Public nuclei-templates version: v10.5.1 (~/nuclei-templates)

$ nuclei -ut
[INF] No new updates found for nuclei templates

-tv reports the installed collection's version and where it lives; -ut (-update-templates) brings it to the latest release. Both were run for real in the lab — the second produced exactly the line above, because the collection had been installed that day. The first run of any scan also checks in passing (chapter 2 watched a first run install the collection outright), and a scan's header reports what it found: the lab's first collection install announced New templates added in latest release: 68 — sixty-eight checks that did not exist in the previous release, which is the normal pace of this project and the reason this chapter exists.

Honest edges

  • Updates need the network, and -duc opts out. The lab's scans ran with -duc for reproducibility, and their headers say the quiet part aloud: the version is reported as (unknown), with a reminder to remove the flag to enable checks. A scripted scan that pins -duc for stability has also pinned its knowledge; update deliberately, on a schedule, outside the scan itself.
  • A hand-assembled directory is not the same as an installed collection. Before letting nuclei install its own, the lab placed two template files in ~/nuclei-templates by hand and ran -ut: the engine reported the collection outdated (latest v10.5.1) but did not adopt or replace the hand-placed folder. Deleting the folder and letting a normal run install the real collection is what worked. If a templates directory has been edited by hand, expect to meet this; the fix is to let the tool own its shelf.
  • Your templates are not the collection's business. Updates replace the collection folder's contents. Templates you wrote live elsewhere (the lab's live in this repo's examples/) and are untouched — one more reason to keep the two apart.
  • Signatures travel with the official files. Chapter 4's digest: line is how the engine knows a collection template is the file its authors published. An update is the moment that guarantee is renewed; a template copied from a random gist carries no such promise, whoever wrote it.

The engine itself updates too (-up), which the lab did not run — the guide is pinned to v3.11.1 so that every quoted line can be reproduced against a known version. Engine releases matter less often than template releases, but new template features occasionally require them, and a collection that refuses to load is usually that story; chapter 12 picks it up.

Check: before any scan you intend to act on, -tv shows a recent version and -ut has nothing to do. If either is months old, the scan's silences are months old too.