Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2025-39423

CVE-2025-39423: Add to Header CSRF Vulnerability

CVE-2025-39423 is a Cross-Site Request Forgery vulnerability in the Add to Header plugin that allows attackers to execute Stored XSS attacks. This article covers the technical details, affected versions up to 1.0, and mitigation.

Updated:

CVE-2025-39423 Overview

CVE-2025-39423 is a Cross-Site Request Forgery (CSRF) vulnerability in the Jenst Add to Header WordPress plugin that enables Stored Cross-Site Scripting (XSS). The flaw affects all versions of add-to-header from n/a through 1.0. An attacker can craft a malicious request that, when triggered by an authenticated administrator visiting an attacker-controlled page, injects persistent JavaScript into header content rendered to site visitors.

Critical Impact

Successful exploitation results in stored JavaScript execution in the browser context of any user loading affected pages, enabling session theft, administrative takeover, and visitor-facing malicious redirects.

Affected Products

  • Jenst Add to Header WordPress plugin (add-to-header)
  • All versions from n/a through 1.0
  • WordPress sites with the plugin installed and active

Discovery Timeline

  • 2025-04-17 - CVE-2025-39423 published to NVD
  • 2026-04-23 - Last updated in NVD database

Technical Details for CVE-2025-39423

Vulnerability Analysis

The vulnerability chains two distinct weaknesses. First, the plugin's settings endpoint that controls header content lacks CSRF protection [CWE-352]. Second, the input accepted by that endpoint is not sanitized before being stored and rendered, producing a Stored XSS sink. An attacker who lures an authenticated administrator to a malicious page can submit arbitrary HTML and JavaScript into the plugin's header configuration. The injected payload then executes in every visitor's browser whenever affected pages load.

Root Cause

The root cause is the absence of anti-CSRF token validation on the plugin's header-management request handler. WordPress provides wp_nonce_field() and check_admin_referer() primitives, but the plugin does not validate a nonce before persisting settings. Output is also rendered unescaped, allowing arbitrary script tags and event handlers stored in the database to execute on the front end.

Attack Vector

Exploitation requires user interaction from a privileged WordPress user, typically an administrator with manage_options capability. The attacker hosts a page containing an auto-submitting HTML form or fetch() request targeting the plugin's settings URL. When the victim visits the page while authenticated to WordPress, the browser sends the forged request with valid session cookies. The injected script is then stored as header content and served to every subsequent page visitor.

No verified public exploit code is available. See the Patchstack Vulnerability Report for additional technical context.

Detection Methods for CVE-2025-39423

Indicators of Compromise

  • Unexpected <script> tags, inline event handlers, or external JavaScript references in the plugin's stored header configuration
  • WordPress options table entries associated with add-to-header containing obfuscated or base64-encoded payloads
  • HTTP POST requests to plugin admin endpoints with Referer headers pointing to external domains
  • Outbound requests from site visitors to unknown third-party domains originating from page headers

Detection Strategies

  • Review the WordPress database for the plugin's stored options and inspect rendered header HTML for script content
  • Inspect web server access logs for administrative POST requests with external or missing Referer values
  • Deploy Content Security Policy reporting to surface unexpected inline script execution on front-end pages
  • Compare current header configuration against a known-good baseline captured before the plugin was last modified

Monitoring Recommendations

  • Alert on changes to WordPress plugin settings outside scheduled maintenance windows
  • Monitor administrator browser sessions for cross-origin form submissions targeting /wp-admin/
  • Track new outbound domains referenced from rendered site content using web telemetry

How to Mitigate CVE-2025-39423

Immediate Actions Required

  • Deactivate and remove the Jenst Add to Header plugin until a patched version is published
  • Audit stored header content and remove any unauthorized scripts or markup
  • Force password resets and invalidate active sessions for all administrator accounts
  • Replace the plugin with an actively maintained alternative for injecting header content

Patch Information

No vendor-supplied patch is referenced in the available advisory data. The vulnerability affects versions through 1.0, and no fixed release has been published. Refer to the Patchstack Vulnerability Report for updated remediation status.

Workarounds

  • Remove the plugin entirely and inject header content via a child theme's functions.php or wp_head hook
  • Restrict access to /wp-admin/ by IP allowlist at the web server or WAF layer
  • Enforce SameSite=Strict or SameSite=Lax on WordPress authentication cookies to limit CSRF reach
  • Deploy a restrictive Content Security Policy that disallows inline scripts and unknown external origins

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.