Monitor vulnerabilities like this one. Sign up free to get alerted when software you use is affected.
6.4

WordPress AddFunc Head & Footer Code plugin allows attackers to inject scripts

CVE-2026-2305
Summary

An attacker with Contributor-level access or higher can inject malicious scripts into WordPress websites using the AddFunc Head & Footer Code plugin. This can happen when an administrator previews or views a post. To fix this, update the plugin to a version newer than 2.3 or use a reputable security plugin to sanitize user input.

Original title
The AddFunc Head & Footer Code plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the `aFhfc_head_code`, `aFhfc_body_code`, and `aFhfc_footer_code` post meta values in all versio...
Original description
The AddFunc Head & Footer Code plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the `aFhfc_head_code`, `aFhfc_body_code`, and `aFhfc_footer_code` post meta values in all versions up to, and including, 2.3. This is due to the plugin outputting these meta values without any sanitization or escaping. While the plugin restricts its own metabox and save handler to administrators via `current_user_can('manage_options')`, it does not use `register_meta()` with an `auth_callback` to protect these meta keys. This makes it possible for authenticated attackers, with Contributor-level access and above, to inject arbitrary web scripts via the WordPress Custom Fields interface that execute when an administrator previews or views the post.
nvd CVSS3.1 6.4
Vulnerability type
CWE-79 Cross-site Scripting (XSS)
Published: 10 Apr 2026 · Updated: 10 Apr 2026 · First seen: 10 Apr 2026