CVE-2026-2305 AddFunc Head & Footer Code <= 2.3 - Authenticated (Contributor+) Stored Cross-Site Scripting via Custom Fields

Medium 6.4 Published Updated

Authenticated contributors can inject malicious scripts via custom fields, leading to code execution when administrators view posts.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2026-2305?

CVE-2026-2305 is a medium-severity cross-site scripting vulnerability in AddFunc Head & Footer Code, published on 10 Apr 2026. Any signed-in user can exploit it over the network, with no action from the victim.

Official 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.

Weakness: CWE-79

Which versions are affected by CVE-2026-2305?

How do I fix CVE-2026-2305?

No fix has been published for CVE-2026-2305 yet. Limit exposure of the affected software until one is available.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2026-2305 being exploited?

There is no known exploitation of CVE-2026-2305 in the wild and no public exploit code.

Sources

Also known as GHSA-5pcm-449r-xrg6.

Is CVE-2026-2305 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free