CVE-2026-77871

Post Snippets <= 4.2.4 - Authenticated (Contributor+) Stored Cross-Site Scripting via Shortcode Attributes

Published Oct 28, 2026 CVSS 3.1 · 6.4 Medium EPSS < 1% KEV · Not listed
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 &lt;script&gt;...&lt;/script&gt; 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.

Analysis

AI-generated

Technical impact

The Post Snippets – Custom WordPress Code Snippets Customizer plugin has a stored XSS flaw in its shortcode attribute handling. Unsanitized attribute values are saved and later rendered by the plugin’s shortcode filter, allowing an authenticated contributor or higher user to insert JavaScript that runs in visitors’ browsers. The vulnerability can lead to session hijacking, credential theft, or defacement of a site when a user views a page containing the malicious snippet. The weakness is an input validation issue identified by CWE‑79.

Affected Systems

The flaw affects all WordPress installations running any Post Snippets plugin version up to and including 4.2.4. The plugin is distributed by the vendor saadiqbal and is commonly active in WordPress sites that enable custom code snippets via shortcodes. No other products or versions are listed as affected in the CNA data.

Risk and Exploitability

The CVSS score of 6.4 indicates a moderate severity, and the EPSS score is not available, so the publicly known exploitation probability cannot be quantified at this time. The vulnerability is not yet included in the CISA KEV catalog. Because the exploit requires only authenticated contributor‑level access and relies on the plugin’s shortcodes, an attacker with legitimate contributor permissions can easily create a malicious snippet without further privilege escalation. Sites that have the plugin installed and allow contributors to edit or create snippets should prioritize remediation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Post Snippets plugin to the latest release that fixes the shortcode attribute sanitization issue.
  • If an immediate upgrade is not possible, restrict contributors from creating or editing shortcodes, or temporarily disable the Post Snippets plugin until a patch is applied.
  • Search the database for and remove any existing snippets that contain suspicious code, then re‑create any legitimate snippets using verified input.

Generated by OpenCVE AI on October 28, 2026 at 09:06 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Saad Iqbal
Saad Iqbal post Snippets
Wordpress-extensions
Wordpress-extensions post Snippets
Vendors & Products Saad Iqbal
Saad Iqbal post Snippets
Wordpress-extensions
Wordpress-extensions post Snippets
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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 &lt;script&gt;...&lt;/script&gt; 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.
Title Post Snippets <= 4.2.4 - Authenticated (Contributor+) Stored Cross-Site Scripting via Shortcode Attributes
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 6.4, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
Wordfence
Published
Updated
Oct 29, 2026, 1:41 AM
Reserved
Aug 21, 2026, 2:55 PM
Status
Deferred
Published
Oct 28, 2026, 7:16 AM
Modified
Oct 29, 2026, 2:16 AM