CVE-2021-4418
WordPress vulnerability analysis and mitigation

Overview

The Custom CSS, JS & PHP plugin for WordPress (versions up to 2.0.7) contains a Cross-Site Request Forgery (CSRF) vulnerability identified as CVE-2021-4418. The vulnerability exists due to missing or incorrect nonce validation in the save() function, which allows unauthenticated attackers to save code snippets via forged requests if they can trick a site administrator into performing certain actions like clicking a link (NVD).

Technical details

The vulnerability stems from improper implementation of WordPress security nonces in the save() function located in modules/code/model.code.php. The code only verifies the nonce if it is present in the request, but fails to properly validate when the nonce is missing, creating a security bypass condition. The vulnerability has been assigned a CVSS v3.1 Base Score of 4.3 (MEDIUM) with the vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N (Wordfence).

Impact

If successfully exploited, this vulnerability allows attackers to save malicious code snippets to the WordPress site through CSRF attacks. This requires tricking an authenticated administrator into performing specific actions, but could lead to unauthorized code execution if successful (NVD).

Mitigation and workarounds

Users should update the Custom CSS, JS & PHP plugin to a version newer than 2.0.7 which contains the security fix. The vulnerability was patched by implementing proper nonce validation in the save() function (WordPress Plugin).

Additional resources


SourceThis report was generated using AI

Related WordPress vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-13342CRITICAL9.8
  • acf-frontend-form-element
NoYesDec 03, 2025
CVE-2025-13359MEDIUM6.5
  • simple-tags
NoYesDec 03, 2025
CVE-2025-13756MEDIUM4.3
  • fluent-booking
NoYesDec 03, 2025
CVE-2025-13354MEDIUM4.3
  • simple-tags
NoYesDec 03, 2025
CVE-2025-13109MEDIUM4.3
  • woocommerce-products-filter
NoYesDec 03, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management