Severity by source
AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L
Contributor account required (PR:L); admin must actively preview post (UI:R); JavaScript executes in admin browser session causing scope change (S:C); no direct availability impact from XSS itself.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
4DescriptionCVE.org
The Code Embed WordPress plugin prior to version 2.6.1 is vulnerable to stored Cross-Site Scripting (XSS) through the external URL embed feature in post content. The vulnerable code scans rendered content for URL embed tokens, fetches the remote URL, and inserts the remote response body into the page without output sanitization or an unfiltered_html capability check. This allows a Contributor attacker to submit a pending post containing an inert-looking URL token that executes attacker-controlled JavaScript when an Administrator or Editor previews or reviews the post. This is distinct from CVE-2026-2512, which affected custom field meta values up to version 2.5.1. This vector affects version 2.6 and uses the documented external URL embed feature in post content. This particular issue is patched in version 2.6.1.
AnalysisAI
Stored XSS in the Code Embed WordPress plugin (versions prior to 2.6.1) permits a Contributor-role attacker to plant a URL embed token referencing an attacker-controlled server; when an Administrator or Editor previews or reviews the pending post, the plugin fetches the remote URL and injects the unfiltered response body-including arbitrary JavaScript-directly into the rendered page. The root cause is a dual omission in add-embeds.php: no output sanitization on fetched remote content and no unfiltered_html capability check before URL-embed expansion, a pattern confirmed by the commit diff from the fix release. No public exploit has been identified at time of analysis; vendor-released patch 2.6.1 is confirmed by a GitHub release tag, a commit, and the plugin changelog.
Technical ContextAI
The Code Embed plugin (CPE: cpe:2.3:a:dartiss:code-embed) provides a WordPress token mechanism that embeds external code snippets into post content by specifying a remote URL. The vulnerable code path in includes/add-embeds.php called ce_quick_replace() unconditionally for both HTTP and HTTPS URL tokens, fetching the remote resource and inserting the raw response body into $content via str_replace() without any sanitization. This is a textbook CWE-79 (Improper Neutralization of Input During Web Page Generation) violation: user-controllable data-the URL itself and the remote server's arbitrary response-entered the output stream directly. WordPress's role-capability model reserves the unfiltered_html capability for Administrators and Editors; Contributors explicitly lack it. The plugin failed to gate URL-embed expansion on this capability, so Contributor-authored posts could carry URL tokens that execute attacker-controlled content when rendered by any higher-privileged reviewer. The fix introduces two complementary controls: a save_post hook (ce_save_url_embed_permission) that stamps the post with a meta flag recording whether the post author held unfiltered_html at save time, and a runtime gate that suppresses URL-embed expansion for posts lacking that flag; fetched content is additionally passed through wp_kses_post() for sanitization.
RemediationAI
Upgrade Code Embed to version 2.6.1, the vendor-released patch confirmed by the GitHub release at https://github.com/dartiss/code-embed/releases/tag/2.6.1 and commit 399752029c62fea82a9bc13fd156713fb4d50ea8. If immediate upgrade is not possible, the most effective compensating control is to audit and remove unnecessary Contributor-role accounts, eliminating the attacker foothold entirely; this has no functional side effect for sites with controlled contributor lists. A secondary control is to avoid previewing or reviewing posts from untrusted Contributor accounts until the patch is applied, though this disrupts normal editorial workflows. Site administrators should also inspect existing pending posts authored by Contributors for URL embed tokens (typically formatted as plugin-specific shortcodes or tokens referencing external domains) before opening them in preview or review mode, since stored payloads persist until removed.
More in Code Embed
View allA vulnerability in David Artiss Code Embed simple-embed-code.3.6. Rated medium severity (CVSS 6.5), this vulnerability i
The Code Embed plugin for WordPress (versions up to 2.5.1) contains a stored cross-site scripting vulnerability that all
The Code Embed plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the plugin's script embed functiona
Same weakness CWE-79 – Cross-site Scripting (XSS)
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-54510