CVE-2025-13035

Code · Code Snippets plugin for WordPress

A high-severity vulnerability has been identified in the Code Snippets plugin for WordPress, impacting all versions up to and including 3.0.

Executive summary

A high-severity vulnerability has been identified in the Code Snippets plugin for WordPress, impacting all versions up to and including 3.0. This flaw allows for PHP Code Injection, which could enable an attacker to execute arbitrary code on the server, potentially leading to a complete compromise of the affected website, data theft, and further malicious activities.

Vulnerability

The Code Snippets plugin for WordPress fails to properly sanitize or validate user-supplied input before it is executed as PHP code. An authenticated attacker, potentially with low-level permissions such as a contributor, could craft a malicious code snippet and save it. Upon execution of the snippet, the injected PHP code would run with the privileges of the web server, leading to Remote Code Execution (RCE) and a full compromise of the WordPress installation.

Business impact

This vulnerability is rated as high severity with a CVSS score of 8. A successful exploit could result in a complete takeover of the organization's website. Potential consequences include theft of sensitive data (customer information, user credentials, proprietary data), website defacement, distribution of malware to visitors, and using the compromised server as a pivot point for further attacks on the internal network. Such an incident could lead to significant reputational damage, financial loss, and regulatory penalties.

Remediation

Immediate Action:

  • Immediately update the Code Snippets plugin to the latest version available (a version greater than 3).
  • Review all existing code snippets for any suspicious or malicious code and delete them.
  • If the plugin's functionality is not critical, consider deactivating and removing it entirely to reduce the attack surface.

Proactive Monitoring:

  • Monitor web server access logs for unusual POST requests to wp-admin pages associated with the Code Snippets plugin.
  • Implement file integrity monitoring to detect unauthorized changes to core WordPress files, themes, or other plugins.
  • Review audit logs for the creation of new, unauthorized user accounts, especially with administrative privileges.

Compensating Controls:

  • Deploy a Web Application Firewall (WAF) with rulesets designed to detect and block PHP injection attempts.
  • Restrict access to the WordPress administrative dashboard (/wp-admin/) to trusted IP addresses.
  • Enforce the principle of least privilege for all WordPress user roles, ensuring only highly trusted administrators have the capability to create or edit code snippets.

Exploitation status

Public Exploit Available: true

Analyst recommendation

Given the high severity (CVSS 8), the public availability of an exploit, and the critical impact of a successful attack, it is strongly recommended that organizations patch this vulnerability immediately. All WordPress sites using the Code Snippets plugin should be considered at high risk. Organizations should prioritize updating the plugin to the latest secure version and conduct a thorough review for any signs of compromise.