Impact
This information disclosure vulnerability originates from PHP’s base image. It exposes the PHP version via the X-Powered-By header, enabling attackers to fingerprint the server and assess potential exploits.
Additionally, the PHP version can also be inferred through the PILOS version displayed in the footer and by examining the source code available on GitHub.
Patches
This information disclosure vulnerability has been patched in PILOS in v4.8.0
Workarounds
Remove header in reverse proxy.
NGINX
location / {
proxy_pass http://127.0.0.1:5000;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
+ proxy_hide_header X-Powered-By;
proxy_http_version 1.1;
}
APACHE
ProxyPreserveHost On
ProxyPass "/" "http://127.0.0.1:5000/" nocanon
ProxyPassReverse "/" "http://127.0.0.1:5000/"
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"
+ Header unset X-Powered-By
Impact
This information disclosure vulnerability originates from PHP’s base image. It exposes the PHP version via the
X-Powered-Byheader, enabling attackers to fingerprint the server and assess potential exploits.Additionally, the PHP version can also be inferred through the PILOS version displayed in the footer and by examining the source code available on GitHub.
Patches
This information disclosure vulnerability has been patched in PILOS in v4.8.0
Workarounds
Remove header in reverse proxy.
NGINX
location / { proxy_pass http://127.0.0.1:5000; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Port $server_port; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; + proxy_hide_header X-Powered-By; proxy_http_version 1.1; }APACHE
ProxyPreserveHost On ProxyPass "/" "http://127.0.0.1:5000/" nocanon ProxyPassReverse "/" "http://127.0.0.1:5000/" RequestHeader set X-Forwarded-Proto "https" RequestHeader set X-Forwarded-Port "443" + Header unset X-Powered-By