Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-104726 Overview
CVE-2026-104726 is a Stored Cross-Site Scripting (XSS) vulnerability in the Name Directory plugin for WordPress. The flaw affects all versions up to and including 1.34.2 and stems from insufficient input sanitization and output escaping on the dir shortcode attribute [CWE-79]. Authenticated users with contributor-level access or higher can inject arbitrary web scripts into pages. The injected scripts execute in the browser of any user who views an affected page, enabling session theft, redirection, or further client-side attacks against site visitors and administrators.
Critical Impact
Contributor-level attackers can persist JavaScript in WordPress pages, executing in the context of every visitor including site administrators.
Affected Products
- Name Directory plugin for WordPress, versions up to and including 1.34.2
- WordPress sites allowing contributor-level or higher user registration
- Fixed in Name Directory version 1.34.3
Discovery Timeline
- 2026-10-16 - CVE-2026-104726 published to NVD
- 2026-10-16 - Last updated in NVD database
Technical Details for CVE-2026-104726
Vulnerability Analysis
The Name Directory plugin provides a shortcode interface that renders directory listings on WordPress pages and posts. The dir attribute of this shortcode accepts user-controlled values that flow into page output without adequate sanitization or escaping. An authenticated contributor can embed the shortcode with a malicious dir value in any post they create. When the post is rendered, the injected markup is parsed by the browser and the attacker-controlled JavaScript executes.
Because the payload persists in the WordPress database and executes for every visitor, the impact extends beyond the authenticated attacker's session. Administrators previewing or publishing contributor submissions trigger the payload with their privileged session context, enabling account takeover or further plugin configuration abuse.
Root Cause
The underlying issue is a failure to apply WordPress sanitization functions (such as sanitize_text_field()) on inbound shortcode attribute values and corresponding escaping functions (such as esc_attr() or esc_html()) on output. The vulnerable code paths are documented at the Name Directory shortcode.php line 284 and shortcode.php line 344. The vendor remediation is published in the Name Directory 1.34.3 changeset.
Attack Vector
Exploitation requires an authenticated session with contributor privileges or higher on the target WordPress site. The attacker creates or edits a post that includes the Name Directory shortcode with a crafted dir attribute containing JavaScript. When any user — including anonymous visitors or administrators reviewing the submission — loads the rendered page, the payload executes in their browser. The scope change in the CVSS vector reflects that the executed script affects users beyond the attacker's own security context. See the Wordfence vulnerability analysis for additional technical context.
Detection Methods for CVE-2026-104726
Indicators of Compromise
- Name Directory shortcode usage containing HTML tags, javascript: URIs, or event handlers inside the dir attribute value
- Unexpected <script> elements or inline event handlers appearing in rendered pages that embed Name Directory output
- WordPress posts authored by contributor-tier accounts that reference the Name Directory shortcode with unusual attribute content
- Outbound requests from administrator browsers to attacker-controlled domains shortly after reviewing contributor posts
Detection Strategies
- Query the wp_posts table for post_content entries containing the Name Directory shortcode and inspect dir attribute values for script syntax
- Enable WordPress audit logging on post creation and update events for contributor-role accounts
- Deploy a Content Security Policy that reports inline script violations, surfacing stored XSS execution at render time
- Use web application firewall rules to flag shortcode attributes containing angle brackets, encoded script tags, or on* event handlers
Monitoring Recommendations
- Monitor administrative session activity for anomalous API calls originating from the browser immediately after viewing contributor-authored content
- Track plugin inventory to confirm the installed Name Directory version is 1.34.3 or later across all sites
- Review new contributor account registrations and correlate with first-post shortcode content
How to Mitigate CVE-2026-104726
Immediate Actions Required
- Upgrade the Name Directory plugin to version 1.34.3 or later on all WordPress installations
- Audit all existing posts and pages that use the Name Directory shortcode for suspicious dir attribute content and remove any injected markup
- Review contributor-tier and higher accounts, disabling any that are unused or unrecognized
- Rotate administrator session cookies and credentials if evidence suggests prior exploitation
Patch Information
The vendor released Name Directory 1.34.3 with corrected sanitization and escaping on the dir shortcode attribute. The code changes are visible in the Name Directory 1.34.3 changeset. Update through the WordPress admin dashboard under Plugins or via WP-CLI.
Workarounds
- Temporarily deactivate the Name Directory plugin until the update is applied
- Restrict post publishing privileges so contributor-tier accounts cannot embed shortcodes, by filtering shortcode registration for low-privilege roles
- Deploy a Content Security Policy that forbids inline scripts to reduce exploitability of stored XSS payloads
# Update Name Directory plugin via WP-CLI
wp plugin update name-directory --version=1.34.3
# Verify installed version across a multisite network
wp plugin list --name=name-directory --fields=name,version,status
# Temporary mitigation: deactivate plugin pending update
wp plugin deactivate name-directory
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

