CVE-2021-4418
JSON

4.3medium

Custom CSS, JS & PHP <= 2.0.7 - Cross-Site Request Forgery Bypass

Severity
4.3medium CVSS:3.1 by Wordfence
Exploit likelihood
0.48% (higher than 42% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Wordfence

Description

The Custom CSS, JS & PHP plugin for WordPress is vulnerable to Cross-Site Request Forgery in versions up to, and including, 2.0.7. This is due to missing or incorrect nonce validation on the save() function. This makes it possible for unauthenticated attackers to save code snippets via a forged request granted they can trick a site administrator into performing an action such as clicking on a link.

Affected

Product or packageVersionsReported by
flippercode Custom css-js-phpup to 2.0.7CVE List
wpfactory custom_css,_js_&_phpup to 2.0.7NVD

All scores

Wordfence4.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
NVD4.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N

Classification

CWE-352

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

The Custom CSS, JS & PHP plugin for WordPress is vulnerable to Cross-Site Request Forgery in versions up to, and including, 2.0.7. This is due to missing or incorrect nonce validation on the save() function. This makes it possible for unauthenticated attackers to save code snippets via a forged request granted they can trick a site administrator into performing an action such as clicking on a link.

NVD (es)

El complemento Custom CSS, JS &amp; PHP para WordPress es vulnerable a Cross-Site Request Forgery (CSRF) en versiones hasta la 2.0.7 incluida. Esto se debe a una validación nonce faltante o incorrecta en la función save(). Esto hace posible que atacantes no autenticados guarden fragmentos de código a través de una solicitud falsificada, siempre que puedan engañar al administrador del sitio para que realice una acción como hacer click en un enlace.

References

https://www.wordfence.com/threat-intel/vulnerabilities/id/d21dc02f-789c-497e-9d01-02fa49bf9e30?source=cvethird-party-advisory
https://blog.nintechnet.com/25-wordpress-plugins-vulnerable-to-csrf-attacks/not-applicable
https://blog.nintechnet.com/more-wordpress-plugins-and-themes-vulnerable-to-csrf-attacks/not-applicable
https://blog.nintechnet.com/multiple-wordpress-plugins-fixed-csrf-vulnerabilities-part-3/not-applicable
https://blog.nintechnet.com/multiple-wordpress-plugins-fixed-csrf-vulnerabilities-part-2/exploit, third-party-advisory
https://blog.nintechnet.com/multiple-wordpress-plugins-fixed-csrf-vulnerabilities-part-1/not-applicable
https://blog.nintechnet.com/multiple-wordpress-plugins-fixed-csrf-vulnerabilities-part-5/not-applicable
https://blog.nintechnet.com/multiple-wordpress-plugins-fixed-csrf-vulnerabilities-part-4/not-applicable
https://plugins.trac.wordpress.org/browser/custom-css-js-php/trunk/modules/code/model.code.php#L85patch

Sources

SourceRecordLicence
CVE ListCVE-2021-4418 changed 2026-04-08CVE Terms of Use
NVDCVE-2021-4418 changed 2026-06-17Public domain