Description
The HTTP Headers plugin for WordPress is vulnerable to External Control of File Name or Path leading to Remote Code Execution in all versions up to and including 1.19.2. This is due to insufficient validation of the file path stored in the 'hh_htpasswd_path' option and lack of sanitization on the 'hh_www_authenticate_user' option value. The plugin allows administrators to set an arbitrary file path for the htpasswd file location and does not validate that the path has a safe file extension (e.g., restricting to .htpasswd). Additionally, the username field used for HTTP Basic Authentication is written directly into the file without sanitization. The apache_auth_credentials() function constructs the file content using the unsanitized username via sprintf('%s:{SHA}%s', $user, ...), and update_auth_credentials() writes this content to the attacker-controlled path via file_put_contents(). This makes it possible for authenticated attackers, with Administrator-level access and above, to write arbitrary content (including PHP code) to arbitrary file paths on the server, effectively achieving Remote Code Execution.
Published: 2026-04-22
Score: 7.2 High
EPSS: < 1% Very Low
KEV: No
Impact: Remote Code Execution
Action: Immediate Patch
AI Analysis

Impact

The HTTP Headers plugin for WordPress allows authenticated administrators to set the file path for htpasswd and provides a username field for HTTP Basic Authentication. Neither field is properly validated or sanitized. The htpasswd path can be arbitrarily set to any location on the server, and the username is written directly into the file using sprintf without escaping. Consequently, an attacker can write PHP code, or other arbitrary content, to any file path the server can access, leading to remote code execution. This flaw stems from a lack of external file path validation (CWE-73).

Affected Systems

WordPress installations running the HTTP Headers plugin version 1.19.2 or earlier, provided by vendor zinoui. The vulnerability affects all versions up to and including 1.19.2.

Risk and Exploitability

The vulnerability carries a CVSS score of 7.2, indicating a high severity. The EPSS score is not available and the vulnerability is not listed in CISA KEV. Exploitation requires the attacker to have Administrator-level access or higher in the WordPress site, but no additional privileged system access is required. Once the path and username fields are manipulated, the attacker can write and execute arbitrary code on the server, resulting in complete compromise of the affected site.

Generated by OpenCVE AI on April 22, 2026 at 09:23 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the HTTP Headers plugin to the latest released version (e.g., 1.19.3 or newer) that validates the htpasswd path and sanitizes the username input.
  • If an upgrade cannot be performed immediately, temporarily disable the HTTP Headers plugin or remove the capability to edit the htpasswd_path and username options in the WordPress administrator interface to block the attack vector.
  • Ensure that file permissions for the WordPress wp-content directory and any directories potentially writable by the plugin are set to the minimum required for operation, preventing arbitrary file writes.

Generated by OpenCVE AI on April 22, 2026 at 09:23 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 22 Apr 2026 12:15:00 +0000

Type Values Removed Values Added
First Time appeared Wordpress
Wordpress wordpress
Zinoui
Zinoui http Headers
Vendors & Products Wordpress
Wordpress wordpress
Zinoui
Zinoui http Headers

Wed, 22 Apr 2026 08:30:00 +0000

Type Values Removed Values Added
Description The HTTP Headers plugin for WordPress is vulnerable to External Control of File Name or Path leading to Remote Code Execution in all versions up to and including 1.19.2. This is due to insufficient validation of the file path stored in the 'hh_htpasswd_path' option and lack of sanitization on the 'hh_www_authenticate_user' option value. The plugin allows administrators to set an arbitrary file path for the htpasswd file location and does not validate that the path has a safe file extension (e.g., restricting to .htpasswd). Additionally, the username field used for HTTP Basic Authentication is written directly into the file without sanitization. The apache_auth_credentials() function constructs the file content using the unsanitized username via sprintf('%s:{SHA}%s', $user, ...), and update_auth_credentials() writes this content to the attacker-controlled path via file_put_contents(). This makes it possible for authenticated attackers, with Administrator-level access and above, to write arbitrary content (including PHP code) to arbitrary file paths on the server, effectively achieving Remote Code Execution.
Title HTTP Headers <= 1.19.2 - Authenticated (Administrator+) External Control of File Name or Path to RCE via 'hh_htpasswd_path' and 'hh_www_authenticate_user' Parameters
Weaknesses CWE-73
References
Metrics cvssV3_1

{'score': 7.2, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H'}


Subscriptions

Wordpress Wordpress
Zinoui Http Headers
cve-icon MITRE

Status: PUBLISHED

Assigner: Wordfence

Published:

Updated: 2026-04-22T07:45:40.959Z

Reserved: 2026-03-13T14:17:17.140Z

Link: CVE-2026-4132

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-04-22T09:16:24.240

Modified: 2026-04-22T09:16:24.240

Link: CVE-2026-4132

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-04-22T11:43:55Z

Weaknesses