Server version disclosure (Server, X-Powered-By): is it real, how to fix it, what to tell the customer
Facts
- Scanner finding
- KB-F-0007 · Web and API
- Also known as
- Server Leaks Version Information via "Server" HTTP Response Header Field, Server Leaks Information via "X-Powered-By" HTTP Response Header Field(s), HTTP Server Type and Version, Web Server HTTP Header Information Disclosure
- Tool IDs
- ZAP 10036: 10036-2 "Server Leaks Version Information via "Server" HTTP Response Header Field" and 10036-1 for the product name alone; ZAP 10037 "Server Leaks Information via "X-Powered-By" HTTP Response Header Field(s)"; ZAP 10061 "X-AspNet-Version Response Header"; Nessus 10107 "HTTP Server Type and Version", 48204 "Apache HTTP Server Version", 106375 "nginx HTTP Server Detection", 88099 "Web Server HTTP Header Information Disclosure"; nuclei
nginx-version,apache-detect,php-detect,aspnet-version-detect,aspnetmvc-version-disclosure. Burp has no issue type for it in its published list - Standard
- CWE-497, as ZAP cites it
- Lab
- scanner-findings-b2, runs 1 to 9 on 2026-11-28: nginx 1.30.8, Apache httpd 2.4.71, Express 5.3.0, helmet 8.3.0, images pinned by digest
- Test
tests/version-disclosure.sh url..., fails on the vulnerable targets, passes after the fix- Next review
- 2027-05-28
Short answer
The finding (ZAP 10036-2, 10037, 10061; Nessus 10107, 48204, 106375, 88099; nuclei nginx-version, apache-detect, php-detect) means a response named your software and its version, in Server, X-Powered-By or on an error page. It is real if curl -sI or a 404 page shows a version. Fix it at the layer that sends it: server_tokens off, ServerTokens Prod, app.disable('x-powered-by'). Then check that the version is current; hiding an old one does not patch it.
1. What the scanner saw
ZAP 10036 reads every
Serverheader. A value with any digit raises 10036-2, rated Low (rule source at commit afb5113e).ZAP 10036-1 (Informational) covers a value without digits, such as
nginx, and is raised only when the rule's threshold is set to Low. SoServer: nginxpasses a default ZAP scan, andServer: awselb/2.0does not.ZAP 10037 fires on any
X-Powered-Byheader, whatever its value, rated Low (rule source). ZAP 10061 does the same forX-AspNet-VersionandX-AspNetMvc-Version(ZAP 10061).nuclei
nginx-versionmatchesnginx/plus digits in the headers of/, and only when the status is 200.apache-detectmatchesApacheanywhere in the headers of a 200 response, with or without a version, soServerTokens Proddoes not silence it.php-detectmatchesPHP/,PHPSESSIDor.phpin the headers (templates at commit eb28249).Nessus 10107, 48204 and 106375 are Info detections. 88099 is rated Medium, but its page lists
Settings/ParanoidReportas a required key, so it appears only in scans with report paranoia turned on (Tenable 88099). Tenable's code is not public; 48204 listsapache_http_error_page_detectamong its dependencies (Tenable 48204), which suggests it also reads error pages.
2. Is it real on your system?
curl -sS -D - -o /dev/null https://app.example.com/ | grep -iE '^(server|x-powered-by|x-aspnet)'
curl -sS https://app.example.com/no-such-page | grep -ioE '(nginx|apache|microsoft-iis|php)/[0-9.]+'
curl -sS -D - -o /dev/null -H "X-Probe: $(head -c 20000 /dev/zero | tr '\0' a)" https://app.example.com/ | grep -i '^server'
The third command sends one oversized header, so the web server answers with its own 400 page before your application sees the request. On our nginx with defaults all three showed nginx/1.30.8, and the 404 page body ended in <center>nginx/1.30.8</center>. After server_tokens off they showed Server: nginx and no version.
Causes of a wrong answer, each seen in our lab or in the sources:
Set in one
locationonly. Our catch-all site hadserver_tokens offinsidelocation /. Every page and every made-up path returned 200 withServer: nginx, so a scanner or a spot check says "fixed". The oversized-header request got a 400 from nginx withServer: nginx/1.30.8and the version in the body. Set it in thehttporserverblock.The proxy passes the app's header. nginx by default does not pass
Date,Server,X-PadandX-Accel-...from the upstream (nginxproxy_hide_header).X-Powered-Byis not on that list. Our nginx withserver_tokens offin front of Express still sentX-Powered-By: Express.Hidden on
/, not on the API. Our second proxy hidX-Powered-Byinlocation /and not inlocation /api/./was clean,/api/datawas not. Check one URL perlocationor route group.Apache passes the backend's
Serverheader. WithServerTokens Prod, our Apache sentServer: Apachefor its own pages andServer: gunicorn/23.0.0for a proxied app that set that header. AddingHeader unset Serverto the virtual host made it sendServer: Apachethere too. nginx in front of the same app sentServer: nginx.404 for everything. A site that answers every path with 404 still shows the version on that page. nuclei
nginx-versionneeds status 200, so it stays silent there; our test fails it.Checking the wrong scheme.
http://sent to an HTTPS port gets nginx's own 400 page ("The plain HTTP request was sent to HTTPS port"). Withserver_tokens offon that port, it shows no version, and an earlier version of our test passed it. Ahttp://URL that redirects tohttps://passes too if only the redirect is checked, while our lab's HTTPS side still sentServer: nginx/1.30.8. A release check found that the same version of the test also passed a scheme-relative redirect (Location: //other-host/) and a redirect from/to/app/on the same host; our lab now has both, and/app/there sendsX-Powered-By. Check the URL the scanner reported, on its own scheme and port, and follow every redirect.Server: nginxis still reported by some tools.apache-detectand Nessus's detection plugins report the product name. This is expected; the version is what the finding is about.
3. How serious it is for you
Our view: informational. Removing the version does not fix anything in the software. Apache's own documentation says that disabling the Server header "does nothing at all to make your server more secure" (Apache ServerTokens), and Express says turning off X-Powered-By does not stop "a sophisticated attacker" from telling it is Express (Express security best practices). It saves an automated scan one step.
Two things make it worth an hour. Customers' checklists ask for it, and the fix is a line per layer. And the disclosed version is a free check for you: if the header says a version with known vulnerabilities, that is the finding to fix, by upgrading.
Accepted risk is reasonable for a product name without a version (Server: nginx, Server: cloudflare), and for platforms where the header cannot be changed.
4. Fix it on your platform
nginx (lab-tested on 1.30.8)
server_tokens off;
proxy_hide_header X-Powered-By;
Put server_tokens off; in the http block, or in each server block, not in a location. It removes the version from the Server header and from nginx's error pages; Server: nginx remains (nginx server_tokens). Setting the header to another value or removing it needs nginx's commercial subscription or a third-party module, which we did not test. Add proxy_hide_header X-Powered-By; next to every proxy_pass to an app that sends it; our partial-fix target shows what one forgotten location does. A location with any proxy_hide_header of its own does not inherit the server-level ones: in our lab, proxy_hide_header X-Powered-By in server plus proxy_hide_header X-Lab-Other in location /api/ let X-Powered-By: Express through on /api/data. Run nginx -t before reloading; it checks the configuration syntax (nginx command line).
Apache httpd (lab-tested on 2.4.71)
ServerTokens Prod
ServerSignature Off
Header unset X-Powered-By
Header always unset X-Powered-By
ServerTokens works only in the main server config; Apache says the setting "applies to the entire server", so it cannot go in a virtual host (Apache ServerTokens). ServerSignature Off is the default and keeps the version off error pages (Apache ServerSignature). Both Header lines are needed because, in the mod_headers documentation's words, "always is not a superset of onsuccess" (mod_headers). With both lines, the proxied Express app's header was gone in our lab; we did not test each line alone. For a proxied app that sends its own Server header, add Header unset Server in that virtual host; in our lab Apache then sent Server: Apache.
The Header lines need mod_headers. It is loaded in the official httpd image we ran; on Debian and Ubuntu, enable it with a2enmod headers (Debian a2enmod, Ubuntu a2enmod). Run apachectl configtest before reloading; it reports Syntax OK or the error (apachectl).
IIS and ASP.NET (from documentation, not run by us)
IIS 10.0 version 1709 and later:
removeServerHeader="true"on<requestFiltering>(IIS request filtering).X-Powered-By: ASP.NETis a custom header that IIS adds from its default config (IIS custom headers); remove it with<remove name="X-Powered-By" />under<httpProtocol><customHeaders>.X-AspNet-Version: setenableVersionHeader="false"on<httpRuntime>; the default is true (HttpRuntimeSection.EnableVersionHeader).
Express and Node.js (lab-tested on Express 5.3.0, helmet 8.3.0)
app.disable('x-powered-by');
Express sends X-Powered-By: Express by default (Express security best practices). app.use(helmet()) removes it too (helmet README). Both passed our test. Our Express targets sent no Server header at all.
PHP (from documentation, not run by us)
expose_php = Off in php.ini removes X-Powered-By: PHP/.... It can be set only in php.ini (PHP core ini settings).
Next.js (from documentation, not run by us)
Next.js adds x-powered-by by default; set poweredByHeader: false in next.config.js (Next.js poweredByHeader).
Cloudflare (from documentation, not run by us)
Response header transform rules can remove X-Powered-By, but Cloudflare says you "cannot modify the value of certain headers such as server" (Cloudflare response header modification). Server: cloudflare has no version.
AWS (from documentation, not run by us)
An Application Load Balancer sends server: awselb/2.0 unless you set the attribute routing.http.response.server.enabled to false (ALB header modification). The digit in that value is enough for ZAP 10036-2. A CloudFront response headers policy can remove headers from the origin; for Server and Date, CloudFront then adds its own (CloudFront response headers policies).
5. What to tell the customer
Example wording, adapt to what is true.
Fixed:
Thank you for the report. Responses from app.example.com no longer include a software version in the
Serverheader, anX-Powered-Byheader, or on error pages. Attached are the response headers for, a 404 page and a 400 page, captured on .
Product name remains:
The
Serverheader now readsnginx, without a version. Our CDN sets its ownServervalue, which cannot be changed. We keep the web server on a supported release, currently <version, released date>.
Not applicable:
The header your scanner reported comes from
, which we do not operate and which shows no version. Headers attached, .
Evidence to attach: curl -sS -D - output for the URLs in the report, one 404 and one 400 response, with the date.
6. Test: fails before the fix, passes after
Our script version-disclosure.sh, run as sh version-disclosure.sh url..., requests each URL, plus a random missing path and one request with a 20 000-byte header for each host and port.
Pass rule, written before the run: exit 0 when every response is HTTP and none has a
Servervalue with a digit, anX-Powered-By,X-AspNet-VersionorX-AspNetMvc-Versionheader, or an error page (status 400 or higher) that names a known server with a version. Header names match in any case. Exit 1 when any response has one of these. Exit 2, not tested, when a URL or a probe gets no HTTP answer (unreachable host, a port that never answers, an SSH port, or https:// to a plain-HTTP port), when a listed URL itself returns 400 (ashttp://sent to a TLS port does), when a listed URL redirects and the exact target URL is not also listed (absolute,//host/...,/pathand relative targets are resolved against the listed URL), when a URL is nothttp://orhttps://, or when a tool is missing. A pass prints a reminder that only the listed URLs were checked, and a 400 probe that does not get an error status prints a note.Run it on your host:
sh version-disclosure.sh https://app.example.com/ https://app.example.com/api/health https://app.example.com/static/app.js, one URL per route group and per proxied service. If a URL redirects, list its target too, for examplehttp://app.example.com/ https://app.example.com/, or/and/app/when/redirects to/app/; the redirect alone exits 2. It needs a POSIX shell,curl,awk,grep,sed,tr,headandmktemp, and exits 2 if one is missing. It ignores certificate errors (-k), since it judges headers only. We ran it with GNU tools (Debian) and with BusyBox (Alpine), with the same results.What the test cannot detect: URLs and route groups you did not list (our partial fix that leaked only on
/api/passed when only/was listed); 5xx error pages, which it cannot trigger; versions in other headers (X-Generator,X-Runtime), in HTML comments,<meta name="generator">, JavaScript files or default pages; and responses that differ by method, cookie or user agent.
7. What we ran
Runs 1 to 9, 2026-11-28 (runs 4 to 6 add the cases from an independent check, runs 7 to 9 two redirect cases from a release check): nginx 1.30.8, Apache httpd 2.4.71, Express 5.3.0, helmet 8.3.0, Node.js 22, images pinned by digest. Every test ran from a GNU and a BusyBox client with the same exit codes in all nine runs, and once more with curl, awk or mktemp removed from PATH, which gave exit 2 each time.
| Target | Config | Our test | ZAP 2.17.0 baseline | nuclei 3.11.1 |
|---|---|---|---|---|
| nginx 80 | defaults | fail: nginx/1.30.8 in header, 404 and 400 pages |
10036-2 | nginx-version |
| nginx 8080 | server_tokens off |
pass, Server: nginx |
no 10036 | none |
| nginx 8081 / 8082 | proxy to Express, without / with proxy_hide_header X-Powered-By |
fail, X-Powered-By: Express / pass |
8081: 10037 | not run |
| nginx 8083 | catch-all, server_tokens off only in location / |
fail on the 400 page only | no 10036 (false negative) | none (false negative) |
| nginx 8084 | header hidden on /, not on /api/ |
fail with /api/data listed; pass with / alone (stated limit) |
not run | not run |
| nginx 8085 | 404 for every path, defaults | fail | not run | none (nginx-version needs status 200) |
| nginx 8086 | proxy to an app sending Server: gunicorn/23.0.0 |
pass, Server: nginx |
not run | not run |
| nginx 8087 | x-powered-by: PHP/8.4.1, lower case |
fail | not run | php-detect |
| Apache, defaults | static, proxied Express, proxied app server | fail: Apache/2.4.71 (Unix), X-Powered-By, gunicorn/23.0.0 |
not run | apache-detect |
Apache, ServerTokens Prod and Header unset X-Powered-By |
static and proxied Express | pass, Server: Apache |
not run | apache-detect (product name) |
| same, proxied app server | fail, Server: gunicorn/23.0.0 |
10036-2 | not run | |
same plus Header unset Server |
proxied app server | pass, Server: Apache |
not run | not run |
| Express | defaults / app.disable('x-powered-by') / helmet() |
fail / pass / pass | defaults: 10037 | not run |
| nginx 8444, then 8443 | http:// sent to a TLS port, with and without server_tokens off |
not tested (exit 2): "the URL itself was rejected (400)"; before the change, 8444 passed | not run | not run |
| nginx 8088 | http:// redirecting to https://ngx-ver:8443 (defaults) |
redirect alone: not tested (exit 2), before the change it passed; with the HTTPS URL listed: fail | not run | not run |
| nginx 8090 / 8091 | Location: //ngx-ver:80/ (another port, defaults there) / Location: /app/ (Express behind it) |
redirect alone: not tested (exit 2); with the target listed: fail | not run | not run |
| nginx 8089 | proxy_hide_header X-Powered-By in server, another proxy_hide_header in location /api/ |
fail on /api/data |
not run | not run |
https:// to a plain port, a port that never answers, an SSH port, an unknown host, an ftp:// URL |
negative cases | not tested (exit 2) in all five | not run | not run |
The runs were done by Claude Opus 5.5 (agent) on an internal Docker network with no outside access. Expected results were written before run 1, before run 4 and before run 7. They are in the lab's results folder with the raw outputs, image digests and file hashes. A separate AI agent checked runs 1 to 3 and found the two false passes now in the table (http:// to a TLS port, a redirect); a second check found the two redirect cases added in runs 7 to 9, and then compared the fixed test and the raw files of runs 4 to 9 with their expected results.
Surprises kept on record:
Apache with
ServerTokens Prodpassed the proxied app's ownServerheader unchanged. We expected this from a development smoke run; we had not seen it documented.ZAP's baseline scan and nuclei both called the catch-all partial fix (8083) clean, since neither requests a page that nginx itself rejects.
The first start of the lab failed because nginx resolved its upstreams before the app containers existed, and a second start was stopped from outside the script. Both are kept as smoke folders; neither counted as a run.
Sources
Primary records first. Record identifiers link from the facts box.
Scanner rules and tool documentation
- ZAP, alert 10036, accessed 2026-11-28
- ZAP, alert 10036-1, accessed 2026-11-28
- ZAP, alert 10036-2, accessed 2026-11-28
- ZAP, alert 10037, accessed 2026-11-28
- ZAP, alert 10061, accessed 2026-11-28
- ZAP, ServerHeaderInfoLeakScanRule.java at commit afb5113 (Apache 2.0), accessed 2026-11-28
- ZAP, XPoweredByHeaderInfoLeakScanRule.java at commit afb5113 (Apache 2.0), accessed 2026-11-28
- Tenable, Nessus plugin 10107, accessed 2026-11-28
- Tenable, Nessus plugin 48204, accessed 2026-11-28
- Tenable, Nessus plugin 106375, accessed 2026-11-28
- Tenable, Nessus plugin 88099, accessed 2026-11-28
- ProjectDiscovery, nuclei template nginx-version.yaml at commit eb28249 (MIT), accessed 2026-11-28
- ProjectDiscovery, nuclei template apache-detect.yaml at commit eb28249 (MIT), accessed 2026-11-28
- ProjectDiscovery, nuclei template php-detect.yaml at commit eb28249 (MIT), accessed 2026-11-28
- ProjectDiscovery, nuclei template aspnet-version-detect.yaml at commit eb28249 (MIT), accessed 2026-11-28
- ProjectDiscovery, nuclei template aspnetmvc-version-disclosure.yaml at commit eb28249 (MIT), accessed 2026-11-28
- PortSwigger, issue definitions (no entry for this finding), accessed 2026-11-28
Vendor documentation and statements
- nginx, server_tokens, accessed 2026-11-28
- nginx, proxy_hide_header, accessed 2026-11-28
- nginx, command-line parameters, accessed 2026-11-28
- Apache httpd, core (ServerTokens, ServerSignature), accessed 2026-11-28
- Apache httpd, mod_headers, accessed 2026-11-28
- Apache httpd, apachectl, accessed 2026-11-28
- Debian, a2enmod manual page, accessed 2026-11-28
- Ubuntu, a2enmod manual page, accessed 2026-11-28
- Express, security best practices, accessed 2026-11-28
- helmet README, accessed 2026-11-28
- Microsoft, IIS request filtering, accessed 2026-11-28
- Microsoft, IIS custom headers, accessed 2026-11-28
- Microsoft, HttpRuntimeSection.EnableVersionHeader, accessed 2026-11-28
- PHP, core ini settings, accessed 2026-11-28
- Next.js, poweredByHeader, accessed 2026-11-28
- Cloudflare, response header modification, accessed 2026-11-28
- AWS, ALB header modification, accessed 2026-11-28
- AWS, CloudFront response headers policies, accessed 2026-11-28
Our lab
- Our lab, arviser-labs at commit eff5333, scanner-findings-b2, accessed 2026-11-28
- Our test, version-disclosure.sh, accessed 2026-11-28
- Our lab, runs 1 to 9 of 2026-11-28: raw outputs, image digests and file hashes, accessed 2026-11-28
Corrections
No corrections.
Report an error to contact@arviser.com.
How this page was made: Claude Opus 5.5, an AI model, built and ran the lab and wrote this page from the sources listed. Separate AI agents checked the claims and the lab test. The test was fixed and rerun after each of two checks (runs 4 to 9), and the fixes were checked against the raw files. Vadim Nareyko approved the family template and the sample pages on 26 November 2026, from a summary in Russian. This page was not reviewed by Vadim Nareyko. On 28 November 2026 Vadim Nareyko decided that new pages in the family are published after the linters and an independent check, without that review.
Text and data on this page: CC BY 4.0. Code in our lab: MIT. Quoted third-party material keeps its own terms.