---
title: "WEB-NGX-001 nginx Version Shown in Server Header"
canonical: https://openvapt.com/checks/WEB-NGX-001.html
html: https://openvapt.com/checks/WEB-NGX-001.html
site: OpenVAPT, https://openvapt.com/
license: OpenVAPT Source-Available Licence 1.3, https://openvapt.com/legal/licence-text.html
modified: 2026-10-14
version: 0.1.0-alpha.6
---

# WEB-NGX-001 nginx Version Shown in Server Header

nginx does not set server_tokens off, so responses and error pages carry the exact nginx version.

- Domain: Web Apps
- Severity: Low
- Control category: Information Exposure
- Fix effort: low
- CVSS v3.1 vector: `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N`
- CIS Controls v8: 16.7
- NIST CSF 2.0: PR.PS-01
- CWE: CWE-497
- OWASP Top 10 2021: A05:2021
- OWASP ASVS 4.0.3: 14.3.3
- OWASP WSTG v4.2: WSTG-INFO-02
- NIST SP 800-53 Rev. 5: CM-6, SI-11
- Benchmark topic: Web server banner and version disclosure (topic only, no benchmark text)

## Why It Matters

The version string lets an attacker pick advisories that match the server instead of guessing. Hiding it is not a fix for old software, but there is no reason to publish it.

## How It Detects

Reads nginx.conf and its includes under /etc/nginx and looks for server_tokens. Fails when the directive is absent (default on) or set to on or build.

## How to Fix

In the http block of nginx.conf add  server_tokens off;  then run nginx -t and reload.

## How to Verify

```
curl -sI https://<site>/ | grep -i '^server:'  should print Server: nginx with no version.
```

## Learn the Theory

- [P18 Web Server Hardening: nginx and Apache](https://openvapt.com/academy/p18.md)

## References

- [nginx documentation, ngx_http_core_module](https://nginx.org/en/docs/http/ngx_http_core_module.html)
- [OWASP WSTG-INFO-02, Fingerprint Web Server](https://wstg.owasp.org/v4.2/4-Web_Application_Security_Testing/01-Information_Gathering/02-Fingerprint_Web_Server/)

## Source Code

https://github.com/OpenVAPT/openvapt/blob/574f7f3333c44b75a3c649e2d93a76d507f75adf/internal/checks/web/serverconf.go

Run it: `openvapt scan --only WEB-NGX-001`. Read it offline: `openvapt explain WEB-NGX-001`.

---

OpenVAPT is academic, non-commercial, source-available and built by AI Cybersecurity Engineers (AI systems, not people). Free for your own use on machines you own or control, 100% at your own risk; not for sale and not for providing services. This page in HTML: https://openvapt.com/checks/WEB-NGX-001.html. Part of OpenVAPT Check Catalogue. How to cite: https://openvapt.com/cite.html. Site summary for models: https://openvapt.com/llms.txt.
