CVE-2025-13035 HIGH

CVE-2025-13035: Code Snippets <= 3.9.1 - Authenticated (Contributor+) PHP Code Injection via extract() and PHP Filter Chains

Vendor Codesnippetspro
Product Code Snippets
Weakness CWE-94 · Code injection
Published November 19, 2025
Last update April 8, 2026

CVSS base score

8.0/10
Attack vector Network
Attack complexity High
Privileges required Low
User interaction Required
Confidentiality High
Integrity High

CVSS vector

CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H

What the vulnerability does

01Description

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.

Explanation of Vulnerability in Simple Terms

02Summary

Code Snippets versions 3.9.1 and earlier allow authenticated users to inject and execute arbitrary PHP code on the site. An attacker with low-level account access can craft malicious input that runs their own code with full site privileges. The vulnerability requires user interaction and affects confidentiality, integrity, and availability.

What an attacker can do

03Attacker Capabilities

Run arbitrary PHP code on the site with full privileges.

Potential impact on your site

04Site Impact

Complete site compromise: data theft, malware injection, user account takeover, or site defacement.

Conditions required to exploit

05Prerequisites

Low-level user account (e.g., contributor or subscriber) and ability to trick an admin into clicking a malicious link.

Key dates

06Disclosure timeline

November 19, 2025 CVE published
April 8, 2026 Record updated