CVE-2026-129218: WP Coder <= 5.0 - Authenticated (Author+) Stored Cross-Site Scripting via '_wp_attachment_image_alt' Attachment Meta via Image-type Shortcode Attribute
The WP Coder – Insert & Manage Code Snippets plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'alttext (WP media REST) → wpattachmentimagealt post meta' parameter in all versions up to, and including, 5.0 due to insufficient input sanitization and output escaping. This makes it possible for authenticated attackers, with author-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page. This requires that an admin-authored image-type snippet exists on the site, as the attacker uploads an image via the standard WordPress media REST endpoint, sets its Alt Text to a double-quote-based payload that survives WordPress core's sanitizetextfield(), and then publishes a post embedding the shortcode.
Affected Software
Event History
Frequently Asked Questions
Who can exploit this issue?
An authenticated WordPress user with Author-level access or higher can exploit it. The attacker must be able to upload an image through the standard WordPress media REST endpoint and publish a post containing the relevant shortcode.
Are all sites using the affected plugin vulnerable by default?
Exploitation requires an administrator-authored image-type WP Coder snippet to already exist on the site. Without that prerequisite, the described attack path is not available.
What must an attacker do to trigger script execution?
The attacker sets a crafted double-quote-based payload as the uploaded image's Alt Text, then publishes a post embedding the shortcode. The injected script executes when a user visits the injected page.
How can administrators identify potentially affected content?
Review sites running WP Coder version 5.0 or earlier for administrator-authored image-type snippets and posts that embed their shortcodes. Also inspect attachment Alt Text values, stored as _wp_attachment_image_alt metadata, for suspicious quote-based script payloads.