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.
Published: 2026-04-10
Score: 6.4 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Stored XSS
Action: Apply Patch
AI Analysis

Impact

The AddFunc Head & Footer Code plugin for WordPress can store arbitrary scripts in its head, body, and footer custom fields without sanitization. Because the plugin outputs these fields directly into page markup, a user with Contributor-level access or higher can inject cross‑site scripting code that runs when a post is previewed or viewed by an administrator. This stored XSS could be used to steal administrative credentials, deface the site, or serve malicious payloads to visitors. The weakness maps to CWE‑79.

Affected Systems

All versions of the AddFunc Head & Footer Code plugin up to and including 2.3 are affected. The plugin is available as a WordPress plugin named AddFunc Head & Footer Code and is likely installed on WordPress sites that use it to inject headers, bodies, or footers.

Risk and Exploitability

The vulnerability has a CVSS score of 6.4, indicating a medium severity. Exploitation requires an authenticated user with Contributor privileges, so the attack vector is internal. EPSS data is not available, and the issue is not listed in the CISA KEV catalog. An attacker who gains contributor access can embed JavaScript that executes in the context of any administrator previewing or viewing the post, enabling possible credential theft, phishing, or site defacement. Because the script is stored, it persists across page loads until removed.

Generated by OpenCVE AI on April 10, 2026 at 04:20 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the AddFunc Head & Footer Code plugin to version 2.4 or newer to resolve the stored XSS flaw.
  • If an upgrade is not available, disable or uninstall the plugin to prevent exploitation.
  • Restrict Contributor-level users from editing head/body/footer custom fields by adjusting role capabilities or using a security plugin.
  • Validate or escape all custom field inputs before rendering them in page markup.
  • Scan the site for injected malicious scripts and remove any that are found.

Generated by OpenCVE AI on April 10, 2026 at 04:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 10 Apr 2026 17:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 10 Apr 2026 09:00:00 +0000

Type Values Removed Values Added
First Time appeared Addfunc
Addfunc addfunc Head & Footer Code
Wordpress
Wordpress wordpress
Vendors & Products Addfunc
Addfunc addfunc Head & Footer Code
Wordpress
Wordpress wordpress

Fri, 10 Apr 2026 03:45:00 +0000

Type Values Removed Values Added
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.
Title AddFunc Head & Footer Code <= 2.3 - Authenticated (Contributor+) Stored Cross-Site Scripting via Custom Fields
Weaknesses CWE-79
References
Metrics cvssV3_1

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


Subscriptions

Addfunc Addfunc Head & Footer Code
Wordpress Wordpress
cve-icon MITRE

Status: PUBLISHED

Assigner: Wordfence

Published:

Updated: 2026-04-10T17:03:14.663Z

Reserved: 2026-02-10T19:59:26.411Z

Link: CVE-2026-2305

cve-icon Vulnrichment

Updated: 2026-04-10T17:03:09.185Z

cve-icon NVD

Status : Deferred

Published: 2026-04-10T04:16:59.690

Modified: 2026-04-24T18:01:58.517

Link: CVE-2026-2305

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-04-10T09:26:51Z

Weaknesses