Host Header Injection Fix
Sets custom headers for WP notification emails. Also fixes a security issue with WP versions < 5.5.
Safe pick
Yes — Host Header Injection Fix is a safe, well-maintained plugin to use in 2026. It runs on 400+ sites, is rated 5/5 and was last updated 4 weeks ago, and scores 82/100 on our health check.
- Actively developed — last update 4 weeks ago
- Tested with the latest WordPress (7.1)
- Momentum — downloads up 182.3% vs the previous 30 days
- Small user base (400+ active installs)
How does it stack up?
Side-by-side on installs, updates, ratings & supportDaily downloads
Download spikes usually follow a new release — each site that auto-updates counts as a download.
Rankings
Where Host Header Injection Fix stands todayWordPress.org search rankings
Live position in the plugin search, top 100| Keyword | Position |
|---|---|
| >100 | |
| headers | #43 |
| injection | #4 |
| notification | >100 |
| security | >100 |
Version adoption
Share of active sites per release.
Rating breakdown
★★★★★★★★★★ 5 from 6 reviews
About Host Header Injection Fix
From the official readme · v3.8Description
👉 Enables custom headers for WP email notifications
👉 Also provides a “set it and forget it” security fix for WP < 5.5
👉 Uses only 50KB of code, so super lightweight, fast, and effective
Important
As of WordPress 5.5, this plugin no longer is necessary to fix the host-header security issue reported in Ticket #25239 finally is fixed, and mentioned in this post WordPress 5.5 Beta 4. Thank You WordPress devs!
Is this plugin still useful?
Yes, it enables you to choose the “From”, “Name”, and “Return-Path” headers for all WP notification emails. And for versions of WordPress less than 5.5, this plugin continues to fix the host-header injection security issue.
Features
This simple plugin does three things:
- Sets custom From, Name, and Return-Path for WP notifications
- Fixes a security vulnerability in WordPress versions < 5.5
- Fixes a bug where invalid email addresses may be generated (in WordPress versions < 5.5)
Choose from the following options:
- Use WordPress defaults (insecure for WP < 5.5)
- Use “Email Address” from WP General Settings
- Use a custom name and address
Plus there is an option to use the specified From address as the Return-Path header.
Why?
The security issue fixed by this plugin has been known about since way back in WordPress version 2.3. There has been some talk about fixing, but nothing has been implemented. While the issue does not affect all sites, it does affect a good percentage of them, including some of my own projects. So, not wanting to get hacked, I decided to write my own solution. Hopefully this issue gets fixed in a future version of WordPress, and this plugin will become unnecessary.
As a bonus, setting an explicit From address resolves a long-standing bug whereby an invalid email address is generated under the following conditions:
- A “From” address is not set,
- And the
$_SERVER['SERVER_NAME']is empty
So by explicitly setting a “From” address, we prevent this bug from happening.
Security Issue
What is the security issue addressed by this plugin? Follows is a quick summary. To learn more in-depth, check out the resources linked in the next section.
- WP uses
$_SERVER['SERVER_NAME']to set the “From” header in email notifications - This includes sensitive email notifications like password resets and user registration
- In some cases, an attacker could modify the “From” header and intercept the email
- Using the intercepted email, an attacker could gain access to your site and wreak havoc
More Infos
This security vulnerability is well-known and has been around for a looong time. To learn more, check out these articles:
Privacy
This plugin does not collect or store any user data. It does not set any cookies, and it does not connect to any third-party locations. Thus, this plugin does not affect user privacy in any way.
Host Header Injection Fix is developed and maintained by Jeff Starr, 15-year WordPress developer and book author.
Support development
I develop and maintain this free plugin with love for the WordPress community. To show support, you can make a donation or purchase one of my books:
- The Tao of WordPress
- Digging into WordPress
- .htaccess made easy
- WordPress Themes In Depth
- Wizard’s SQL Recipes for WordPress
And/or purchase one of my premium WordPress plugins:
- BBQ Pro – Blazing fast WordPress firewall
- Blackhole Pro – Automatically block bad bots
- Banhammer Pro – Monitor traffic and ban the bad guys
- GA Google Analytics Pro – Connect WordPress to Google Analytics
- Head Meta Pro – Ultimate Meta Tags for WordPress
- REST Pro Tools – Awesome tools for managing the WP REST API
- Simple Ajax Chat Pro – Unlimited chat rooms
- USP Pro – Unlimited front-end forms
Links, tweets and likes also appreciated. Thank you! 🙂
Installation
Installing HHIF
- Upload the plugin to your blog and activate
- Visit the plugin settings to configure options
More info on installing WP plugins
Restore Default Options
To restore default options, uninstall the plugin via the WP Plugins screen, and then reinstall.
Like the plugin?
If you like Host Header Injection Fix, please take a moment to give a 5-star rating. It helps to keep development and support going strong. Thank you!
Uninstalling
This plugin cleans up after itself. All plugin settings will be removed from the WordPress database when the plugin is deleted via the WP Plugins screen.
Changelog
Visit the WordPress Plugins screen, locate the plugin, and click "Update" :)
If you like Host Header Injection Fix, please take a moment to give a 5-star rating. It helps to keep development and support going strong. Thank you!
3.8 (2026/11/04)
- Checks plugin with Plugin Check
- Improves security of plugin settings
- Tests on WordPress 7.2
Full changelog @ https://plugin-planet.com/wp/changelog/host-header-injection-fix.txt
For developers
Is this your plugin? Show off the numbers.
Add a live badge to your site, docs or GitHub README. It updates on its own — no account needed.
Best Host Header Injection Fix alternatives
All email plugins →FAQ
Host Header Injection Fix: quick answers
Straight answers, pulled from live WordPress.org data.
Source: WordPress.org
Is Host Header Injection Fix free?
Yes. Host Header Injection Fix is free to download and use from the official WordPress.org plugin directory.
Is Host Header Injection Fix safe to use in 2026?
Yes — Host Header Injection Fix is a safe, well-maintained plugin to use in 2026. It runs on 400+ sites, is rated 5/5 and was last updated 4 weeks ago, and scores 82/100 on our health check.
How many websites use Host Header Injection Fix?
Host Header Injection Fix is active on 400+ WordPress websites and has been downloaded 28,451 times since it launched in November 2017. It was downloaded 748 times in the last 30 days.
Does Host Header Injection Fix work with WordPress 7.1?
Yes. The developer has tested Host Header Injection Fix up to WordPress 7.2, the latest release. It requires WordPress 4.7 or newer.
What PHP version does Host Header Injection Fix need?
Host Header Injection Fix requires PHP 5.6.20 or higher. Most hosts run PHP 8.x today, so it works on any modern WordPress hosting.
When was Host Header Injection Fix last updated?
The latest version, 3.8, was released on November 4, 2026 (4 weeks ago).
Who makes Host Header Injection Fix?
Host Header Injection Fix is developed and maintained by Jeff Starr.
What are the best alternatives to Host Header Injection Fix?
The most popular alternatives to Host Header Injection Fix are WP Mail SMTP by WPForms (4M+ installs), MC4WP: Mailchimp for WordPr… (1M+ installs) and Easy WP SMTP (500K+ installs).
Powered by PageForge
One template and a spreadsheet. A real page for every search.
PageForge turns each row of a CSV into a WordPress page with its own title, URL, SEO fields and schema, built on the layout you already designed. Free on WordPress.org.
- CSV and XLSX, plus Google Sheets on Professional and Enterprise
- Its own title, URL, SEO fields and schema for every page
- Works with the block editor, Elementor, Divi and Avada
- Free on WordPress.org, no credit card

