CVE-2026-77871
Description
The Post Snippets – Custom WordPress Code Snippets Customizer plugin for WordPress is vulnerable to Stored Cross-Site Scripting via Shortcode Attributes in all versions up to, and including, 4.2.4 due to insufficient input sanitization and output 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. Entity-encoded payloads such as <script>...</script> survive WordPress's wp_kses_post on-save sanitization because kses does not decode HTML entities, and are only converted back into executable HTML tags at render time by the plugin's own shortcode filter. This requires snippet shortcodes to be enabled.
Affected WordPress components
-
Post Snippets – Custom WordPress Code Snippets Customizer Plugin · post-snippetsUp to and including 4.2.4View on WordPress.org
A confirmed match is backed by the plugin or theme slug. A possible match is based on the product name only and should be verified.
Affected products and versions
- saadiqbal Post Snippets – Custom WordPress Code Snippets Customizer — Up to and including 4.2.4
References
- plugins.trac.wordpress.org https://plugins.trac.wordpress.org/browser/post-snippets/tags/4.2.3/src/PostSnippets/Shortcode.php#L140
- plugins.trac.wordpress.org https://plugins.trac.wordpress.org/browser/post-snippets/tags/4.2.3/src/PostSnippets/Shortcode.php#L183
- plugins.trac.wordpress.org https://plugins.trac.wordpress.org/browser/post-snippets/tags/4.2.3/src/PostSnippets/Shortcode.php#L29
- plugins.trac.wordpress.org https://plugins.trac.wordpress.org/browser/post-snippets/tags/4.2.3/src/PostSnippets/Shortcode.php#L70
- plugins.trac.wordpress.org https://plugins.trac.wordpress.org/browser/post-snippets/tags/4.2.4/src/PostSnippets/Shortcode.php#L140
- plugins.trac.wordpress.org https://plugins.trac.wordpress.org/browser/post-snippets/tags/4.2.4/src/PostSnippets/Shortcode.php#L183
- plugins.trac.wordpress.org https://plugins.trac.wordpress.org/browser/post-snippets/tags/4.2.4/src/PostSnippets/Shortcode.php#L29
- plugins.trac.wordpress.org https://plugins.trac.wordpress.org/browser/post-snippets/tags/4.2.4/src/PostSnippets/Shortcode.php#L70
- plugins.trac.wordpress.org https://plugins.trac.wordpress.org/changeset/3759640/post-snippets/trunk/src/PostSnippets/Shortcode.php
- www.wordfence.com https://www.wordfence.com/threat-intel/vulnerabilities/id/a46c37f4-245d-423f-bdad-296fdf377ecc?source=cve
- nvd.nist.gov Official NVD record