{"id":"CVE-2025-13035","aliases":["CVE-2025-13035"],"related":[],"kind":"vulnerability","state":"published","title":"Code Snippets <= 3.9.1 - Authenticated (Contributor+) PHP Code Injection via extract() and PHP Filter Chains","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"El plugin Code Snippets para WordPress es vulnerable a la inyección de código PHP en todas las versiones hasta la 3.9.1, inclusive. Esto se debe al uso de 'extract()' por parte del plugin en atributos de shortcode controlados por el atacante dentro del método 'evaluate_shortcode_from_flat_file', que puede usarse para sobrescribir la variable '$filepath' y posteriormente pasarla a 'require_once'. Esto hace posible que atacantes autenticados, con acceso de nivel Colaborador y superior, ejecuten código PHP arbitrario en el servidor a través del shortcode '[code_snippet]' utilizando cadenas de filtro PHP, siempre que puedan engañar a un administrador para que habilite la configuración 'Enable file-based execution' y cree al menos un fragmento de contenido activo.","source":"nvd"}],"published":"2025-11-19T07:46:08.602Z","modified":"2026-10-18T20:10:00.110Z","severity":{"scorer":"Wordfence","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H","score":8,"rating":"HIGH"},"severities":[{"scorer":"Wordfence","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H","score":8,"rating":"HIGH"}],"cwes":["CWE-94"],"affected":[{"ranges":[{"type":"semver","introduced":"0","lastAffected":"3.9.1","status":"affected"}],"vendor":"codesnippetspro","product":"Code Snippets","source":"cvelist"}],"references":[{"url":"https://www.wordfence.com/threat-intel/vulnerabilities/id/c7c7247c-2fc3-46ff-858e-2242b7211476?source=cve","tags":[],"sources":["cvelist","nvd"]},{"url":"https://plugins.trac.wordpress.org/browser/code-snippets/tags/3.8.1/php/front-end/class-front-end.php#L295","tags":[],"sources":["cvelist","nvd"]},{"url":"https://plugins.trac.wordpress.org/browser/code-snippets/tags/3.8.1/php/front-end/class-front-end.php#L296","tags":[],"sources":["cvelist","nvd"]},{"url":"https://plugins.trac.wordpress.org/changeset?sfp_email=&sfph_mail=&reponame=&new=3397635%40code-snippets%2Ftrunk&old=3395415%40code-snippets%2Ftrunk&sfp_email=&sfph_mail=#file23","tags":[],"sources":["cvelist","nvd"]}],"credits":["Michael Mazzolini"],"assigner":"Wordfence","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2025-11-19T17:20:53.291Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-13035","url":"https://www.cve.org/CVERecord?id=CVE-2025-13035","licence":"CVE Terms of Use","modified":"2026-04-08T17:21:28.619Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-13035","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-13035","licence":"Public domain","modified":"2026-10-18T20:10:00.110Z"}],"updatedAt":"2026-11-25T22:59:07.815Z","epss":{"score":0.00707,"percentile":0.49122,"date":"2026-11-30T12:00:22.000Z"}}