CVE-2025-13035: Code Snippets <= 3.9.1 - Authenticated (Contributor+) PHP Code Injection via extract() and PHP Filter Chains
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 evaluateshortcodefromflatfile method, which can be used to overwrite the $filepath variable and subsequently passed to requireonce. This makes it possible for authenticated attackers, with Contributor-level access and above, to execute arbitrary PHP code on the server via the [codesnippet] 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.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2025-13035?
CVE-2025-13035 has a high severity rating due to its potential for PHP code injection, threatening the security of WordPress sites using affected versions.
How do I fix CVE-2025-13035?
To fix CVE-2025-13035, update the Code Snippets plugin to version 3.9.2 or later, which addresses the vulnerability.
Which versions of the Code Snippets plugin are affected by CVE-2025-13035?
All versions of the Code Snippets plugin up to and including 3.9.1 are affected by CVE-2025-13035.
What are the potential impacts of CVE-2025-13035?
The potential impacts of CVE-2025-13035 include unauthorized execution of arbitrary PHP code, leading to potential site compromise.
How can I determine if my site is vulnerable to CVE-2025-13035?
You can determine if your site is vulnerable to CVE-2025-13035 by checking if you have Code Snippets plugin version 3.9.1 or earlier installed.