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.
On this page
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.
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)
- CVE:
- CVE-2026-101301
Affected versions- All versions before 2.4.0
Patched versions: 2.4.0
Update to at least version 2.4.0.
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)
- CVE:
- CVE-2026-8832
Affected versions- All versions up to and including 2.3.5
Patched versions: 2.3.6
Update to at least version 2.3.6.
WPCode <= 2.0.13 - Unauthenticated Reflected Cross-Site Scripting via Tag Filter Links
- Published:
- Last updated:
- Severity:
- Medium (CVSS 6.1)
- CVE:
- CVE-2023-3524
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.
WPCode <= 2.0.8 - Cross-Site Request Forgery
- Published:
- Last updated:
- Severity:
- Medium (CVSS 4.7)
- CVE:
- CVE-2023-1624
Affected versions- All versions up to and including 2.0.8
Patched versions: 2.0.9
Update to at least version 2.0.9.
WPCode <= 2.0.6 - Missing Authorization to Sensitive Key Disclosure/Update
- Published:
- Last updated:
- Severity:
- Medium (CVSS 5.4)
- CVE:
- CVE-2023-0328
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.
The Description column of the WPCode row on the Plugins screen includes the version number. Write it down with the date and any update notice, and give any second WPCode plugin a line of its own.
Open Code Snippets > Code Snippets and list every snippet whose status toggle is on, with its name, code type and priority. Leave the toggles alone: the safe mode guide says switching a snippet on from the list runs WPCode's activation check, which for a PHP or Universal snippet runs the code once.
The 2.4.2 changelog entry says the restricted code check was removed, so "active snippets it skipped run again."
The WPCode item in the admin bar, from the Admin Bar Info setting the safe mode guide says is on by default, shows a count when a snippet has thrown an error, and its Snippets With Errors link lists those snippets; record each one.
Then open Code Snippets > Header & Footer and copy the Header, Body and Footer fields, naming the service behind each script. Leave without pressing Save Changes: the changelog says that when changes are made there, WPCode will attempt to clear the page cache of popular caching plugins.
Open each active snippet by its title. In the Insertion panel, record the Insert Method, Auto Insert or Shortcode, the Location, and any CSS Selector or number field the location adds. The locations guide says a Shortcode snippet runs only where its shortcode is pasted, and that Run Everywhere runs the snippet everywhere on the website.
In the Smart Conditional Logic box, record whether Enable Logic is on, whether its dropdown reads Show or Hide, and every rule group. The conditional logic guide says that with Show the snippet runs only when the rules match, and with Hide it runs everywhere except where they match.
Close without clicking Update, Save Snippet or Execute Snippet Now; the locations guide says the last, shown on On Demand snippets, saves the snippet and runs it once.
Use the role filter links on the Users screen to list the accounts in each role, starting with Administrator. The Access Control guide says its settings need a pro licence level or higher. Where the Access Control tab under Code Snippets > Settings shows them, write down the roles named against each of its five permissions, from "Edit Text/Blocks Snippets" to "Use the File Editor".
The guide says every field starts empty, that "Edit HTML, JavaScript & CSS Snippets" also opens the Global Header and Footer screen, and that the role list includes roles a theme or another plugin added.
The plugin's own help text for Access Control says "By default, all permissions are provided only to administrator users."
Record whether "AI & Automation Access" is on. The plugin's own help text for it says it lets AI assistants and automation tools connected through the WordPress Abilities API "create and edit snippets and header & footer code", that read-only access to snippets, error logs and settings is always on, even when the setting is off, and that tools can only do what the connected user is allowed to do.
The Access Control guide says the plugin can be disconnected from the WPCode Library on the General Settings tab: note there whether the site is connected, and press no button.
The same guide says that while a site is connected, a role with "Edit PHP Snippets" can also manage the snippets in the private library.
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. The safe mode guide says that while the first is in place, WPCode does not run auto-inserted snippets for anyone who visits the site. The Access Control guide says the second turns PHP snippets off and hides the on-screen "Disable PHP snippets" option.
Where that option shows on the Access Control tab, record whether it is on; the guide says it arrives off. If an admin address you used carries wpcode-safe-mode=1, or a yellow notice says safe mode is on, note it beside your readings: the safe mode guide says that while safe mode is on, WPCode runs none of the auto-inserted snippets, and that this only affects logged-in users who can activate snippets.
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 licenceHide the 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.
Source records
- WPCode - Insert Headers and Footers + Custom Code Snippets - WordPress Code Manager < 2.4.0 - Unauthenticated Snippet Safe Mode Bypass (CVE-2026-101301)
- WPCode <= 2.3.5 - Authenticated (Author+) Remote Code Execution via CPT Capability Bypass via XML-RPC wp.newPost (CVE-2026-8832)
- WPCode <= 2.0.13 - Unauthenticated Reflected Cross-Site Scripting via Tag Filter Links (CVE-2023-3524)
- WPCode <= 2.0.8 - Cross-Site Request Forgery (CVE-2023-1624)
- WPCode <= 2.0.6 - Missing Authorization to Sensitive Key Disclosure/Update (CVE-2023-0328)