nginx Security in Short
nginx has fewer flaws than most web servers, and most of them are in optional modules (HTTP/3, mp4, the resolver), so whether one affects you often depends on your configuration. Many servers run the version their distribution shipped years ago, with fixes added by the distribution.
How to Keep nginx Patched
- Update through your distribution or nginx's own repository, then
sudo nginx -t && sudo systemctl reload nginx. - Hide the version number:
server_tokens off;in thehttpblock. It doesn't fix anything, but scanners look for it. - After an advisory, check whether you use the affected module before deciding how urgent it is.