# Code Embed <= 2.6.4 - Authenticated (Contributor+) Stored Cross-Site Scripting via Embed Tokens and Custom Fields

- **ID:** WPSEC-2026-3790
- **Plugin:** Code Embed (`simple-embed-code`), https://wordpress.org/plugins/simple-embed-code/
- **Affected versions:** all versions before 2.6.5
- **Fixed in:** 2.6.5 (Update to 2.6.5 or later.)
- **Severity:** Medium 6.4 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N)
- **Weakness:** CWE-79
- **Usage among sites WPSec scans:** plugin Medium, affected versions Medium (as of 2026-11-24)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/simple-embed-code
- **Fix released:** 2026-11-23
- **Published:** 2026-11-24
- **URL:** https://wpsec.com/vuln/WPSEC-2026-3790/

## Description

The Code Embed plugin for WordPress is vulnerable to Stored Cross-Site Scripting via embed tokens and embed custom fields in all versions up to, and including, 2.6.4. This is due to the plugin replacing embed tokens with custom-field values wherever the tokens appear in post content, including inside HTML tag attributes, and accepting embed custom-field names that contain arbitrary characters. The values are only filtered with wp_kses_post(), which keeps quote characters in plain text. 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.

## References

- https://wpsec.com/vuln/WPSEC-2026-3790/
- https://plugins.svn.wordpress.org/simple-embed-code/tags/2.6.5/
- https://wordpress.org/plugins/simple-embed-code/

Source: WPSec, https://wpsec.com/vuln/WPSEC-2026-3790/

License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Free to use, share and adapt, also commercially, if you credit WPSec and link to this advisory.
