CVE-2025-13035 Details
Description
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.
A PHP code injection vulnerability exists in the Code Snippets plugin for WordPress, affecting all versions through 3.9.1. The issue arises from the plugin's use of the extract() function on shortcode attributes controlled by the attacker, specifically within the 'evaluate_shortcode_from_flat_file' method. This vulnerability allows authenticated attackers with Contributor-level access or higher to overwrite the '$filepath' variable, which is then passed to require_once. By doing so, they can execute arbitrary PHP code on the server via the '[code_snippet]' shortcode, provided they can persuade an administrator to enable the 'Enable file-based execution' setting and create at least one active Content snippet.
Users are advised to update the Code Snippets plugin to version 3.9.2 or a newer patched version.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Nov 19, 2025CISA-ADP
Assessed Nov 19, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-94 | Improper Control of Generation of Code ('Code Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Code Snippets | <= 3.9.1 (semver) |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 18, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Nov 19, 2025 | New CVE Received | [email protected] |
Volerion