CVE-2025-13035: CWE-94 Improper Control of Generation of Code ('Code Injection') in codesnippetspro Code Snippets
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.
AI Analysis
Technical Summary
The Code Snippets plugin for WordPress suffers from a PHP code injection vulnerability (CWE-94) due to unsafe use of extract() on shortcode attributes controlled by an attacker. This allows overwriting the $filepath variable passed to require_once, enabling arbitrary PHP code execution on the server. The vulnerability affects all versions up to and including 3.9.1. Exploitation requires authenticated access at Contributor level or above, and relies on an administrator enabling the "Enable file-based execution" setting and having at least one active Content snippet. The CVSS 3.1 base score is 8.0, indicating high severity with network attack vector, high impact on confidentiality, integrity, and availability, and requiring low privileges but user interaction.
Potential Impact
Successful exploitation allows an authenticated user with Contributor-level access or higher to execute arbitrary PHP code on the server hosting the WordPress site. This can lead to full compromise of the web server, including data theft, site defacement, or further pivoting within the network. The attack requires tricking an administrator to enable a specific plugin setting, which adds a social engineering component to the threat. There are no known exploits in the wild at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a patch is available, administrators should avoid enabling the "Enable file-based execution" setting in the Code Snippets plugin and restrict Contributor-level access where possible. Monitoring plugin settings and limiting administrative actions can reduce risk. Do not enable file-based execution unless absolutely necessary and only after verifying plugin updates or vendor advisories.
CVE-2025-13035: CWE-94 Improper Control of Generation of Code ('Code Injection') in codesnippetspro Code Snippets
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.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The Code Snippets plugin for WordPress suffers from a PHP code injection vulnerability (CWE-94) due to unsafe use of extract() on shortcode attributes controlled by an attacker. This allows overwriting the $filepath variable passed to require_once, enabling arbitrary PHP code execution on the server. The vulnerability affects all versions up to and including 3.9.1. Exploitation requires authenticated access at Contributor level or above, and relies on an administrator enabling the "Enable file-based execution" setting and having at least one active Content snippet. The CVSS 3.1 base score is 8.0, indicating high severity with network attack vector, high impact on confidentiality, integrity, and availability, and requiring low privileges but user interaction.
Potential Impact
Successful exploitation allows an authenticated user with Contributor-level access or higher to execute arbitrary PHP code on the server hosting the WordPress site. This can lead to full compromise of the web server, including data theft, site defacement, or further pivoting within the network. The attack requires tricking an administrator to enable a specific plugin setting, which adds a social engineering component to the threat. There are no known exploits in the wild at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a patch is available, administrators should avoid enabling the "Enable file-based execution" setting in the Code Snippets plugin and restrict Contributor-level access where possible. Monitoring plugin settings and limiting administrative actions can reduce risk. Do not enable file-based execution unless absolutely necessary and only after verifying plugin updates or vendor advisories.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- Wordfence
- Date Reserved
- 2025-11-11T17:05:21.590Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 691d774cfcf6450804cbcaf0
Added to database: 11/19/2025, 7:52:44 AM
Last enriched: 4/9/2026, 9:27:51 AM
Last updated: 5/10/2026, 2:11:42 AM
Views: 140
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.