Fix guide · Exposure · high
PHP version disclosed or end of life
Your server announces its PHP version in the X-Powered-By header. Attackers and bots read it to pick exploits: an end-of-life branch gets no security fixes at all, and a version behind on patches may be open to known bugs such as PHP2Shell (CVE-2026-109618 and CVE-2026-109619).
Time to fix
5 minutes to hide · upgrade varies
Risk if ignored
Targeted, automated exploitation
Breaks anything?
Hiding the version: no. Upgrading: test first
How to fix it
In php.ini (find it with: php --ini):
expose_php = OffThen restart PHP-FPM or Apache. This only hides the version; it does not patch anything.
Patched versions for PHP2Shell: 8.5.12, 8.4.27, 8.3.36 and 8.2.35. Anything older than 8.2 gets no fixes at all.
Check your fix
Common mistakes
- Hiding the header and calling it fixed. The server is just as vulnerable, only quieter.
- Upgrading PHP without testing plugins and themes first.
- Forgetting the CLI and cron PHP, which can be a different version from the web one.