{
 "id": "WPSEC-2026-2642",
 "url": "https://wpsec.com/vuln/WPSEC-2026-2642/",
 "json_url": "https://wpsec.com/vuln/WPSEC-2026-2642/advisory.json",
 "markdown_url": "https://wpsec.com/vuln/WPSEC-2026-2642/index.md",
 "title": "Code Snippets <= 4.0.0 - Authenticated (Administrator+) Missing Authorization to Network Snippet Import",
 "description": "The Code Snippets plugin for WordPress is vulnerable to unauthorized modification of data via the snippet import REST routes (file upload import and third-party plugin import) in all versions up to, and including, 4.0.0, due to the routes' permission callbacks checking only the site-level snippet capability while honouring a 'network' parameter that writes to the network snippets table. This makes it possible for authenticated attackers with subsite administrator access on a multisite installation to create network snippets, or overwrite existing network snippets with the same name, without the network snippet capability.",
 "plugin": {
  "slug": "code-snippets",
  "name": "Code Snippets",
  "full_name": "Code Snippets",
  "wordpress_org": "https://wordpress.org/plugins/code-snippets/",
  "advisories_url": "https://wpsec.com/vuln/plugin/code-snippets/",
  "attacksurface": "https://attacksurface.wpsec.com/plugin/code-snippets"
 },
 "type": "NO AUTHORISATION",
 "cwe": [
  "CWE-862"
 ],
 "cve": [],
 "cvss": {
  "version": "3.1",
  "score": 2.2,
  "vector": "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:L/A:N",
  "severity": "Low"
 },
 "affected": {
  "ranges": [
   {
    "from": "3.9.4",
    "from_inclusive": true,
    "to": "4.1.0",
    "to_inclusive": false
   }
  ],
  "text": [
   "from 3.9.4 before 4.1.0"
  ]
 },
 "introduced_in": "3.9.4",
 "fixed_in": "4.1.0",
 "remediation": "Update to 4.1.0 or later.",
 "fix_released": "2026-11-05T05:28:59+00:00",
 "published": "2026-11-06T12:43:54+00:00",
 "updated": "2026-11-06T11:59:22.140809+00:00",
 "also_published_as": null,
 "references": [
  "https://wpsec.com/vuln/WPSEC-2026-2642/",
  "https://plugins.svn.wordpress.org/code-snippets/tags/4.1.0/",
  "https://wordpress.org/plugins/code-snippets/"
 ],
 "attacksurface_url": "https://attacksurface.wpsec.com/plugin/code-snippets",
 "source": "WPSec",
 "license": {
  "name": "CC BY 4.0",
  "url": "https://creativecommons.org/licenses/by/4.0/"
 },
 "usage": {
  "plugin": "Medium",
  "affected_versions": "Medium",
  "as_of": "2026-11-06"
 }
}