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
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: no
- Technical impact: total
Summary
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.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: total
- Record last updated
Affected versions
- zinoui HTTP Headers
through 1.19.2
References 13
plugins.trac.wordpress.org
- browser/http-headers/trunk/http-headers.php#L1403
- browser/http-headers/tags/1.19.2/http-headers.php#L1403
- browser/http-headers/trunk/http-headers.php#L1298
- browser/http-headers/tags/1.19.2/http-headers.php#L1298
- browser/http-headers/trunk/http-headers.php#L1296
- browser/http-headers/tags/1.19.2/http-headers.php#L1296
- browser/http-headers/trunk/http-headers.php#L97
- browser/http-headers/tags/1.19.2/http-headers.php#L97
- browser/http-headers/trunk/http-headers.php#L671
- browser/http-headers/tags/1.19.2/http-headers.php#L671
- browser/http-headers/trunk/http-headers.php#L722
- browser/http-headers/tags/1.19.2/http-headers.php#L722