CVE-2026-104021: Fastcache by Host.it <= 1.7.4 - Authenticated (Administrator+) Code Injection via .htaccess Directive Injection via 'cache_cookie_exclude' Setting
The Fastcache by Host.it plugin for WordPress is vulnerable to Code Injection in all versions up to, and including, 1.7.4 via the fastcachesettings[cachecookieexclude][] parameter. This is due to the plugin registering the cachecookieexclude setting via registersetting() without a sanitizecallback, while buildSiteHtaccessRules() applies only trim() to each cookie value before interpolating it directly into an Apache RewriteCond line — a normalization that strips surrounding whitespace but leaves embedded newlines intact, allowing an attacker to break out of the capture group and append arbitrary directives. This makes it possible for authenticated attackers, with administrator-level access and above, to inject arbitrary Apache directives into the site's .htaccess file via fileputcontents(), enabling server-level configuration changes such as setting phpvalue autoprependfile to execute attacker-controlled PHP code on every request.
Affected Software
Event History
Frequently Asked Questions
Who can exploit this issue?
An attacker must be authenticated to WordPress with administrator-level access or higher. The attack does not require user interaction.
What level of access could exploitation provide?
An attacker can inject arbitrary Apache directives into the site's .htaccess file. For example, they could configure php_value auto_prepend_file to run attacker-controlled PHP code on every request, enabling server-level configuration changes.
What input is used to inject directives?
The vulnerable input is the fastcache_settings[cache_cookie_exclude][] setting. Embedded newlines are not removed before the value is placed into an Apache RewriteCond line, allowing additional directives to be appended.