Radar sectionsDatabase
Check my site
WordPress plugin

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

CVE-2025-13035Published · Updated

Action summary

Affected: ≤3.9.1Update to 3.9.2 or newer

All remediation steps
Severity
High8.0
CVSS
8.0
CVSS 3.1 · CNA (Wordfence)
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H
What does this vector mean?
AV:N Attack vector
Network
AC:H Attack complexity
High
PR:L Privileges required
Low
UI:R User interaction
Required
S:C Scope
Changed
C:H Confidentiality
High
I:H Integrity
High
A:H Availability
High
Weakness
CWE-94 Improper Control of Generation of Code
Required access
Unknown
Exploit prediction (EPSS)
No score
CISA KEV
Not listed

Am I affected?

Code Snippets code-snippets

  1. Affected≤ 3.9.1
  2. Patched in3.9.2

Update to 3.9.2 or newer.

You are affected if you run ≤ 3.9.1. Version 3.9.2 and later are not affected by this issue.

  • Check your version: in wp-admin go to Plugins → Installed Plugins and read the version under Code Snippets.
  • No admin access? Run a passive check of your site. It reads public files only.

What to do

  1. Update to version 3.9.2, or a newer patched version
  2. Rotate administrator passwords and application secrets if the site ran a vulnerable version while publicly reachable.
  3. Watch Code Snippets to get an email when the next vulnerability is published.

Advisory

Source description from Wordfence Intelligence, credited to Michael Mazzolini.

The Code Snippets plugin for WordPress is vulnerable to PHP Code Injection in all versions up to, and including, 3.9.1. This is due to the plugin's use of extract() on attacker-controlled shortcode attributes within the `evaluate_shortcode_from_flat_file` method, which can be used to overwrite the `$filepath` variable and subsequently passed to require_once. This makes it possible for authenticated attackers, with Contributor-level access and above, to execute arbitrary PHP code on the server via the `[code_snippet]` shortcode using PHP filter chains granted they can trick an administrator into enabling the "Enable file-based execution" setting and creating at least one active Content snippet.

Exploits & references

Proof-of-concept & detection

No public proof-of-concept or detection template is known for this vulnerability.

Advisories & patches

More in Code Snippets

All 10
More vulnerabilities in Code Snippets
SeverityVulnerabilityCVEPublished
Low2.7Missing Authorization
<4.1.0Update to 4.1.0
CVE-2026-106468
Medium4.9Authenticated (Administrator+) SQL Injection
≤3.9.0Update to 3.10.0
CVE-2026-106097
Low2.7Missing Authorization
≤3.9.0Update to 3.10.0
CVE-2026-106095
Medium4.3Cross-Site Request Forgery to Cloud Snippet Download/Update Actions
≤3.9.4Update to 3.9.5
CVE-2026-1785
Medium5.4Cross-Site Request Forgery via load
<3.6.0Update to 3.6.0
CVE-2023-47666

Timeline

  1. CVE published

    Severity high, CVSS 8.0

  2. Record last updated

Sources & licenses

Wordfence record
Vulnerability data
Wordfence Intelligence. [object Object] Licensed under the CC BY-SA 4.0.
CVE® identifiers
[object Object]. Used under the CVE Program. CVE® is a registered trademark of The MITRE Corporation.
CVSS / CWE
National Vulnerability Database (NVD), shown unmodified. This product uses the NVD API but is not endorsed or certified by the NVD.
VulnCrest content
Summary, remediation guidance and page layout © VulnCrest. Not sourced from NVD.

How we use these sources

Search VulnCrest Radar

Are you sure?