CVE-2025-13035 Code Snippets <= 3.9.1 - Authenticated (Contributor+) PHP Code Injection via extract() and PHP Filter Chains
Authenticated contributors can execute arbitrary PHP code if an administrator enables file-based execution and creates active snippets.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- None listed
What is CVE-2025-13035?
CVE-2025-13035 is a high-severity code injection vulnerability in codesnippetspro Code Snippets, published on 19 Nov 2025. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official 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.
Weakness: CWE-94
Which versions are affected by CVE-2025-13035?
How do I fix CVE-2025-13035?
No fix has been published for CVE-2025-13035 yet. Limit exposure of the affected software until one is available.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2025-13035 being exploited?
There is no known exploitation of CVE-2025-13035 in the wild and no public exploit code.
Sources
Also known as GHSA-xr45-qc77-mx25.