Skip to main content
WordPress plugin recordReviewed

WPCode vulnerability records, and where to read the code it adds to a site

WPCode, once Insert Headers and Footers, prints header scripts and runs PHP and JavaScript snippets.

Match its records by their version fields, then read the snippets, roles and safe mode settings a version leaves out.

WPCode vulnerability history

Source: Wordfence Intelligence (Vulnerability Data Feed v3, Production), retrieved on . It lists 5 records for WPCode. 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 2.4.0

Worked out from data retrieved on .

Every affected range listed in this source for WPCode ends before version 2.4.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. WPCode - Insert Headers and Footers + Custom Code Snippets - WordPress Code Manager < 2.4.0 - Unauthenticated Snippet Safe Mode Bypass

    Published:
    Last updated:
    Severity:
    High (CVSS 7.3)
    Affected versions
    • All versions before 2.4.0

    Patched versions: 2.4.0

    Update to at least version 2.4.0.

  2. WPCode <= 2.3.5 - Authenticated (Author+) Remote Code Execution via CPT Capability Bypass via XML-RPC wp.newPost

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

    Patched versions: 2.3.6

    Update to at least version 2.3.6.

  3. WPCode <= 2.0.13 - Unauthenticated Reflected Cross-Site Scripting via Tag Filter Links

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

    Patched versions: 2.0.13.1

    Update to at least version 2.0.13.1.

  4. WPCode <= 2.0.8 - Cross-Site Request Forgery

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

    Patched versions: 2.0.9

    Update to at least version 2.0.9.

  5. WPCode <= 2.0.6 - Missing Authorization to Sensitive Key Disclosure/Update

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

    Patched versions: 2.0.7

    Update to at least version 2.0.7.

Check WPCode 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.

What WPCode runs, and who can add code to it

The WordPress.org listing describes WPCode as "formerly known as Insert Headers and Footers by WPBeginner".

It says that aside from header and footer scripts, WPCode can insert PHP, JavaScript, CSS, HTML and text snippets, and that the code snippets it inserts from the dashboard "actually run as if they were in your theme's functions.php file."

The vendor's snippet type guide says PHP snippets run on the server, Universal snippets mix HTML and PHP, and HTML snippets are output exactly as written. The header and footer guide puts Header, Body and Footer fields on the Global Header and Footer screen, and the Access Control guide names a File Editor for ads.txt, app-ads.txt, service-worker.js and robots.txt.

The same guide says administrators already hold every WPCode permission, and that its five role-by-role permissions, which need a pro licence level or higher, let other roles manage parts of WPCode. The widest snippet permission, "Edit PHP Snippets", covers every snippet type.

What the WPCode vulnerability records show

Three of the titles named here carry access words, "Unauthenticated" or "Authenticated (Author+)".

The request forgery title names no account level, so for that record the title is all this page has on access.

  • CVE-2026-101301 has a title ending "Unauthenticated Snippet Safe Mode Bypass". Affected: all versions before 2.4.0. Patched versions: 2.4.0.
  • CVE-2026-8832 has a title ending "Authenticated (Author+) Remote Code Execution via CPT Capability Bypass via XML-RPC wp.newPost". Affected: all versions up to and including 2.3.5. Patched versions: 2.3.6.
  • CVE-2023-3524 has a title ending "Unauthenticated Reflected Cross-Site Scripting via Tag Filter Links". Affected: all versions up to and including 2.0.13. Patched versions: 2.0.13.1.
  • CVE-2023-1624 has a title ending "Cross-Site Request Forgery". Affected: all versions up to and including 2.0.8. Patched versions: 2.0.9.

Reading WPCode's version fields

In these records a patched version can sit inside a later record's affected range. CVE-2023-1624 lists 2.0.9, inside the range of CVE-2023-3524, and CVE-2026-8832 lists 2.3.6, inside the range of CVE-2026-101301. Each patched version answers for its own record, so compare the installed version with every record as well as reading the update guidance at the top of the history.

CVE-2023-3524 lists a four-part patched version, 2.0.13.1, so compare all four parts: a copy on 2.0.13 is inside its range.

Where to read each WPCode check

Work through the checklist on this page on a site you are authorised to review, from an administrator account.

The Access Control guide says the WPCode settings pages stay with administrators. Copy what each screen shows and save nothing.

Plugin version

The Description column of the WPCode row on the Plugins screen includes the version number. 1 min read

Active snippets and header code

Open Code Snippets > Code Snippets and list every snippet whose status toggle is on, with its name, code type and priority. 1 min read

Insertion rules

Open each active snippet by its title. 1 min read

User permissions

Use the role filter links on the Users screen to list the accounts in each role, starting with Administrator. 1 min read

Safe mode configuration

With file access, or through whoever runs the hosting, read wp-config.php for lines defining WPCODE_SAFE_MODE or WPCODE_DISABLE_PHP as true, and copy only those lines. 1 min read

Where a WPCode version match stops

A version inside an affected range shows that a known record covers the installed copy.

It does not show whether the site was attacked, or what WPCode runs on it: a PHP snippet set to Run Everywhere, an editor granted "Edit HTML, JavaScript & CSS Snippets", or a WPCODE_SAFE_MODE line left in wp-config.php. A WordPress security audit tests the editor side with its own test accounts, checking whether script an editor saves runs when an administrator opens the page.

Frequently asked questions

The source data files these records under the insert-headers-and-footers slug, and that filing does not show whether a record also applies to that copy. The vendor's install guide describes it as a zip uploaded through Plugins > Add New, with a licence key entered under Code Snippets > Settings so it can receive updates.

The listing says Insert Headers and Footers was first created by Syed Balkhi and the WPBeginner team in 2011 and rebranded to WPCode in 2022, and the slug keeps the first name. Its FAQ says the old features come back through the Headers & Footers mode, which the plugin's help text says disables all Code Snippets functionality and leaves a single Headers & Footers item under the settings menu.

The listing's FAQ says "All code snippets are stored in the WordPress database, independent of the theme upgrades." The plugin's help text for a setting labelled "Load PHP Snippets as Files" says that when it is enabled, all active PHP, HTML and Universal snippets are loaded from files instead of the database.

Not when it is turned on from an admin address: the safe mode guide says it "only affects logged-in users who can activate snippets, so your visitors don't see any change." The same guide says a WPCODE_SAFE_MODE line in wp-config.php works differently, stopping auto-inserted snippets for anyone who visits the site while it is in place.

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 every record 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.