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.0CVSS 3.1 · CNA (Wordfence)
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:HWhat does this vector mean?
AV:NAttack vector- Network
AC:HAttack complexity- High
PR:LPrivileges required- Low
UI:RUser interaction- Required
S:CScope- Changed
C:HConfidentiality- High
I:HIntegrity- High
A:HAvailability- High
- Required access
- Unknown
- Exploit prediction (EPSS)
- No score
- CISA KEV
- Not listed
On this page8
Am I affected?
Code Snippets code-snippets
- Affected≤ 3.9.1
- 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
- Update to version 3.9.2, or a newer patched version
- Rotate administrator passwords and application secrets if the site ran a vulnerable version while publicly reachable.
- 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
- Advisorywordfence.com
Related CVEs
More in Code Snippets
All 10| Severity | Vulnerability | CVE | Published |
|---|---|---|---|
| Low2.7 | Missing Authorization <4.1.0Update to 4.1.0 | CVE-2026-106468 | |
| Medium4.9 | Authenticated (Administrator+) SQL Injection ≤3.9.0Update to 3.10.0 | CVE-2026-106097 | |
| Low2.7 | Missing Authorization ≤3.9.0Update to 3.10.0 | CVE-2026-106095 | |
| Medium4.3 | Cross-Site Request Forgery to Cloud Snippet Download/Update Actions ≤3.9.4Update to 3.9.5 | CVE-2026-1785 | |
| Medium5.4 | Cross-Site Request Forgery via load <3.6.0Update to 3.6.0 | CVE-2023-47666 |
- Low2.7Missing Authorization
<4.1.0Update to 4.1.0
- Medium4.9Authenticated (Administrator+) SQL Injection
≤3.9.0Update to 3.10.0
- Low2.7Missing Authorization
≤3.9.0Update to 3.10.0
- Medium4.3Cross-Site Request Forgery to Cloud Snippet Download/Update Actions
≤3.9.4Update to 3.9.5
- Medium5.4Cross-Site Request Forgery via load
<3.6.0Update to 3.6.0
Timeline
CVE published
Severity high, CVSS 8.0
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.
