# Copy Anything to Clipboard <= 5.5.4 - Authenticated (Contributor+) Stored Cross-Site Scripting via 'copy' Shortcode Attributes

- **ID:** WPSEC-2026-1590
- **Plugin:** Copy Anything to Clipboard for WordPress – Copy Button, Copy Text & Copy Code (`copy-the-code`), https://wordpress.org/plugins/copy-the-code/
- **Affected versions:** from 5.0.0 before 5.5.5
- **Fixed in:** 5.5.5 (Update to 5.5.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 Low (as of 2026-10-25)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/copy-the-code
- **Fix released:** 2026-10-23
- **Published:** 2026-10-24
- **URL:** https://wpsec.com/vuln/WPSEC-2026-1590/

## Description

The Copy Anything to Clipboard plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the [copy] / [ctc] shortcode's 'success-text', 'copied-text' and 'button-text' attributes (and the [copy_inline] shortcode's 'tooltip' attribute) in all versions up to, and including, 5.5.4, due to insufficient input sanitization of HTML-entity-encoded markup and the front-end script writing these values into the page with innerHTML. 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 clicks the copy button on an injected page.

## References

- https://wpsec.com/vuln/WPSEC-2026-1590/
- https://plugins.svn.wordpress.org/copy-the-code/tags/5.5.5/
- https://wordpress.org/plugins/copy-the-code/

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

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.
