← Back to CVE Explorer

CVE-2026-77871

Full vulnerability record from the local CVENow database.

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.

Severity
MEDIUM
CVSS score
6.4 (v3.1)
Vulnerability status
Deferred
Source identifier
Published
2026-10-28 07:16:49.377000
Last modified
2026-10-29 02:16:53.793000
View original CVE JSON
{
  "id": "CVE-2026-77871",
  "sourceIdentifier": "[email protected]",
  "published": "2026-10-28T07:16:49.377",
  "lastModified": "2026-10-29T02:16:53.793",
  "vulnStatus": "Deferred",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "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": [
    {
      "source": "[email protected]",
      "affectedData": [
        {
          "vendor": "saadiqbal",
          "product": "Post Snippets – Custom WordPress Code Snippets Customizer",
          "defaultStatus": "unaffected",
          "versions": [
            {
              "version": "0",
              "lessThanOrEqual": "4.2.4",
              "versionType": "semver",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "[email protected]",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N",
          "baseScore": 6.4,
          "baseSeverity": "MEDIUM",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "LOW",
          "userInteraction": "NONE",
          "scope": "CHANGED",
          "confidentialityImpact": "LOW",
          "integrityImpact": "LOW",
          "availabilityImpact": "NONE"
        },
        "exploitabilityScore": 3.1,
        "impactScore": 2.7
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-10-29T01:33:15.822523Z",
          "id": "CVE-2026-77871",
          "options": [
            {
              "exploitation": "none"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "partial"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-79"
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://plugins.trac.wordpress.org/browser/post-snippets/tags/4.2.3/src/PostSnippets/Shortcode.php#L140",
      "source": "[email protected]"
    },
    {
      "url": "https://plugins.trac.wordpress.org/browser/post-snippets/tags/4.2.3/src/PostSnippets/Shortcode.php#L183",
      "source": "[email protected]"
    },
    {
      "url": "https://plugins.trac.wordpress.org/browser/post-snippets/tags/4.2.3/src/PostSnippets/Shortcode.php#L29",
      "source": "[email protected]"
    },
    {
      "url": "https://plugins.trac.wordpress.org/browser/post-snippets/tags/4.2.3/src/PostSnippets/Shortcode.php#L70",
      "source": "[email protected]"
    },
    {
      "url": "https://plugins.trac.wordpress.org/browser/post-snippets/tags/4.2.4/src/PostSnippets/Shortcode.php#L140",
      "source": "[email protected]"
    },
    {
      "url": "https://plugins.trac.wordpress.org/browser/post-snippets/tags/4.2.4/src/PostSnippets/Shortcode.php#L183",
      "source": "[email protected]"
    },
    {
      "url": "https://plugins.trac.wordpress.org/browser/post-snippets/tags/4.2.4/src/PostSnippets/Shortcode.php#L29",
      "source": "[email protected]"
    },
    {
      "url": "https://plugins.trac.wordpress.org/browser/post-snippets/tags/4.2.4/src/PostSnippets/Shortcode.php#L70",
      "source": "[email protected]"
    },
    {
      "url": "https://plugins.trac.wordpress.org/changeset/3759640/post-snippets/trunk/src/PostSnippets/Shortcode.php",
      "source": "[email protected]"
    },
    {
      "url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/a46c37f4-245d-423f-bdad-296fdf377ecc?source=cve",
      "source": "[email protected]"
    }
  ]
}