Skip to main content
WordPress plugin recordReviewed

Code Snippets vulnerability history, read beside its snippet, role and safe mode settings

Code Snippets adds PHP and HTML snippets from the WordPress dashboard and, on multisite, manages network-wide snippets.

Some of its affected ranges stop short of their patch or overlap; this page shows where, and how to read snippets, roles, Cloud and safe mode without changing them.

Code Snippets vulnerability history

Source: Wordfence Intelligence (Vulnerability Data Feed v3, Production), retrieved on . It lists 10 records for Code Snippets. Copyright notices, licence terms and a link to each source record are under Data source and licence at the foot of this page.

Update to at least version 4.1.0

Worked out from data retrieved on .

Every affected range listed in this source for Code Snippets ends before version 4.1.0.

A vendor can publish a security release before this source records it. Read the plugin's own changelog as well as this history.

  1. Code Snippets < 4.1.0 - Missing Authorization

    Published:
    Last updated:
    Severity:
    Low (CVSS 2.7)
    Affected versions
    • All versions before 4.1.0

    Patched versions: 4.1.0

    Update to at least version 4.1.0.

  2. Code Snippets <= 3.9.0 - Missing Authorization

    Published:
    Last updated:
    Severity:
    Low (CVSS 2.7)
    Affected versions
    • All versions up to and including 3.9.0

    Patched versions: 3.10.0

    Update to at least version 3.10.0.

  3. Code Snippets <= 3.9.0 - Authenticated (Administrator+) SQL Injection

    Published:
    Last updated:
    Severity:
    Medium (CVSS 4.9)
    Affected versions
    • All versions up to and including 3.9.0

    Patched versions: 3.10.0

    Update to at least version 3.10.0.

  4. Code Snippets <= 3.9.4 - Cross-Site Request Forgery to Cloud Snippet Download/Update Actions

    Published:
    Last updated:
    Severity:
    Medium (CVSS 4.3)
    Affected versions
    • All versions up to and including 3.9.4

    Patched versions: 3.9.5

    Update to at least version 3.9.5.

  5. Code Snippets <= 3.9.1 - Authenticated (Contributor+) PHP Code Injection via extract() and PHP Filter Chains

    Published:
    Last updated:
    Severity:
    High (CVSS 8.0)
    Affected versions
    • All versions up to and including 3.9.1

    Patched versions: 3.9.2

    Update to at least version 3.9.2.

Show 5 older records
  1. Code Snippets <= 3.5.0 - Cross-Site Request Forgery via load

    Published:
    Last updated:
    Severity:
    Medium (CVSS 5.4)
    Affected versions
    • All versions before 3.6.0

    Patched versions: 3.6.0

    Update to at least version 3.6.0.

  2. Code Snippets <= 2.14.3 - Reflected Cross-Site Scripting

    Published:
    Last updated:
    Severity:
    Medium (CVSS 4.7)
    Affected versions
    • All versions up to and including 2.14.3

    Patched versions: 2.14.4

    Update to at least version 2.14.4.

  3. Code Snippets <= 2.14.2 - Reflected Cross-Site Scripting

    Published:
    Last updated:
    Severity:
    Medium (CVSS 6.1)
    Affected versions
    • All versions before 2.14.3

    Patched versions: 2.14.3

    Update to at least version 2.14.3.

  4. Code Snippets <= 2.13.3 - Cross-Site Request Forgery to Remote Code Execution

    Published:
    Last updated:
    Severity:
    High (CVSS 8.8)
    Affected versions
    • All versions up to and including 2.13.3

    Patched versions: 2.14.0

    Update to at least version 2.14.0.

  5. Code Snippets < 2.7.0 - Reflected Cross-Site Scripting

    Published:
    Last updated:
    Severity:
    Medium (CVSS 6.1)
    Affected versions
    • All versions before 2.7.0

    Patched versions: 2.7.0

    Update to at least version 2.7.0.

Check Code Snippets on a live site

Read-only checks for a site you own or are authorised to review. Each step uses the WordPress dashboard or WP-CLI and sends no test payloads to the site.

Where code enters a site through Code Snippets

Code Snippets is listed on WordPress.org with the byline "By Code Snippets Pro".

Its listing says the free plugin adds PHP snippets, for custom functions and WordPress hooks, and HTML content snippets placed in posts and pages with shortcodes. A PHP snippet can run everywhere, administration only or front end only, and run-once snippets are offered for one-time tasks that a user confirms. In the listing's words, "PHP snippets execute code on your site."

Snippets also arrive through the Snippets import screen, the Community Cloud library and, on multisite, network snippets shared with subsites, all named on the listing. The vendor's role permissions page says that by default only administrators can manage snippets. Its multisite guide says subsite administrators can open the Snippets menus on their own subsite by default, while only Super Admins reach the one in Network Admin.

Code Snippets affected versions: gaps, overlaps and title versions

The history on this page holds the records the source data files under the slug code-snippets.

Cross-Site Request Forgery, Reflected Cross-Site Scripting and Missing Authorization recur in their titles. Where a title states the access needed, take it as written: CVE-2025-13035 has a title ending "Authenticated (Contributor+) PHP Code Injection via extract() and PHP Filter Chains", and CVE-2026-106097 one ending "Authenticated (Administrator+) SQL Injection".

The version fields need care in these places:

  • Ranges that stop short of their patch. CVE-2026-106097 and CVE-2026-106095, whose title ends "Missing Authorization", list all versions up to and including 3.9.0 with a patched version of 3.10.0. The fields say nothing about the versions between the two, so for each of those records the patched version is the one to reach.
  • A patch inside a later range. CVE-2025-13035 lists all versions up to and including 3.9.1, patched in 3.9.2, and CVE-2026-1785, whose title ends "Cross-Site Request Forgery to Cloud Snippet Download/Update Actions", all versions up to and including 3.9.4, patched in 3.9.5. A site that stopped at 3.9.2 is outside the first range and inside the second, so compare the installed version with every record.
  • A title version that differs from the fields. The title of CVE-2023-47666 names 3.5.0 and ends "Cross-Site Request Forgery via load", while its affected range and patched versions field give all versions before 3.6.0, patched in 3.6.0. Match on the fields.

Update status, and the changelog as a second read

Read the update guidance at the top of the history with each record's own fields. In the changelog on the WordPress.org listing, some fixes end by thanking a named person "for responsibly disclosing this issue": read those entries as well before an update.

Reading Code Snippets settings without changing them

On a site you are authorised to review, each step in this section reads and records only: leave every screen without saving, activating, importing, connecting, disconnecting or switching versions.

The role permissions page says the plugin's Settings page stays admin-only.

Plugin name, version and the version switcher

On the Plugins screen, the Code Snippets row's Description column gives the version number and the author name. 1 min read

Active snippets and where each one runs

The listing points to the Snippets menu for managing code, and its free feature list includes table and card views, code preview without opening the editor, and a Stats overview with active and inactive counts and breakdowns by type, run location and tags. 1 min read

Network sharing and the Cloud connection

On multisite, the vendor's multisite guide says a network snippet saved and activated in Network Admin with the "Allow this snippet to be activated on individual sites on the network" box unchecked runs on every network site where the plugin is active, while a checked box makes it a network shared snippet each subsite can activate. 1 min read

Who can manage snippets

The role permissions page says Code Snippets Pro 4.0 or later, with an active licence, adds a Role Permissions setting on the Advanced tab of Snippets > Settings that gives each role None, View, Edit, which adds creating and changing snippets, or Full, which adds deleting them. 1 min read

Safe mode in wp-config.php

Under its "Global Method" heading, the vendor's safe mode page turns safe mode on with a line in wp-config.php, define( 'CODE_SNIPPETS_SAFE_MODE', true );, and says to turn it off by commenting out or deleting that line. 1 min read

What a Code Snippets version match leaves unanswered

Matching the installed version to the history shows which known records cover the site, not whether anyone used one or what the active snippets do.

The listing's FAQ says snippets live in the database, in a table named from the site's prefix such as wp_snippets, with network snippets in one such as wp_ms_snippets, and that with optional file-based execution enabled the plugin also creates files used to execute them.

Export to PHP, also in the FAQ, writes PHP snippets to a file for use without the plugin. Ask whether any were moved into a theme or plugin that way.

Nor does the version show role permission levels, the network menu boxes or the safe mode line. A WordPress security audit captures requests an administrator makes in plugin settings screens, Snippets > Settings among them, replays them as a subscriber, and confirms an editor cannot reach plugin or settings requests by calling them directly.

Frequently asked questions

The history holds the records the source data files under the slug code-snippets, and being filed there does not settle whether a record also applies to Code Snippets Pro. The vendor's Pro installation guide says the two are completely separate plugins that cannot run at the same time, and that Pro is uploaded from a member dashboard download once the free plugin is deactivated and deleted. It says both share the same database, so snippets carry over if Complete Uninstall is deselected first.

The vendor's safe mode page says all snippets are temporarily paused while it is active, so the one causing an error can be deactivated. Adding snippets-safe-mode=1 to a page's URL turns it on for that page, but only for a user logged in as an administrator; other visitors see the site as normal.

Not according to the vendor's import guide: imported snippets are always inactive until activated on the Snippets page. The Import Snippets screen takes a .json or .xml export file, not a .php file, and asks whether to import duplicates anyway, replace snippets with the same name, or skip them.

Not for local snippets: the listing says creating and running local PHP and HTML snippets needs no account. It adds that personal Cloud library, synchronisation and deployment workflows need a connected account and the relevant Pro access, and the vendor's Cloud guide says the Cloud account is separate from the Pro licence account.

Scope the right test for your application

Tell us what you have built, who uses it and when it needs to launch. You will get a plain-English recommendation: a website audit, a web application test or a referral to a specialist.

Data source and licence

The vulnerability records on this page come from Wordfence Intelligence (Vulnerability Data Feed v3, Production), retrieved on . The records contain material that is subject to copyright. Each copyright notice and its licence are reproduced once below, followed by a link to every source record.

Copyright 2012-2026 Defiant Inc.

Applies to every record listed below.

Defiant hereby grants you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute this software vulnerability information. Any copy of the software vulnerability information you make for such purposes is authorized provided that you include a hyperlink to this vulnerability record and reproduce Defiant's copyright designation and this license in any such copy.

Copyright 1999-2026 The MITRE Corporation

Applies to 9 of the 10 records listed below.

CVE Usage: MITRE hereby grants you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Common Vulnerabilities and Exposures (CVE®). Any copy you make for such purposes is authorized provided that you reproduce MITRE's copyright designation and this license in any such copy.