6.4medium
Code Embed <= 2.5.1 - Authenticated (Contributor+) Stored Cross-Site Scripting via Custom Fields
- Severity
- 6.4medium CVSS:3.1 by Wordfence
- Exploit likelihood
- 0.23% (higher than 15% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Wordfence
Description
The Code Embed plugin for WordPress is vulnerable to Stored Cross-Site Scripting via custom field meta values in all versions up to, and including, 2.5.1. This is due to the plugin's sanitization function `sec_check_post_fields()` only running on the `save_post` hook, while WordPress allows custom fields to be added via the `wp_ajax_add_meta` AJAX endpoint without triggering `save_post`. The `ce_filter()` function then outputs these unsanitized meta values directly into page content without escaping. 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 an injected page.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| dartiss Code Embed | up to 2.5.1 | CVE List |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
The Code Embed plugin for WordPress is vulnerable to Stored Cross-Site Scripting via custom field meta values in all versions up to, and including, 2.5.1. This is due to the plugin's sanitization function `sec_check_post_fields()` only running on the `save_post` hook, while WordPress allows custom fields to be added via the `wp_ajax_add_meta` AJAX endpoint without triggering `save_post`. The `ce_filter()` function then outputs these unsanitized meta values directly into page content without escaping. 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 an injected page.
NVD (es)
El plugin Code Embed para WordPress es vulnerable a cross-site scripting almacenado a través de valores meta de campos personalizados en todas las versiones hasta la 2.5.1, inclusive. Esto se debe a que la función de saneamiento del plugin `sec_check_post_fields()` solo se ejecuta en el hook `save_post`, mientras que WordPress permite que se añadan campos personalizados a través del endpoint AJAX `wp_ajax_add_meta` sin activar `save_post`. La función `ce_filter()` luego muestra estos valores meta no saneados directamente en el contenido de la página sin escapar. Esto hace posible que atacantes autenticados, con acceso de nivel Colaborador o superior, inyecten scripts web arbitrarios en páginas que se ejecutarán cada vez que un usuario acceda a una página inyectada.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-2512 changed 2026-04-08 | CVE Terms of Use |
| NVD | CVE-2026-2512 changed 2026-06-17 | Public domain |