CVE-2024-12238: CWE-94 Improper Control of Generation of Code ('Code Injection') in kstover Ninja Forms – The Contact Form Builder That Grows With You
CVE-2024-12238 is a medium severity vulnerability in the Ninja Forms WordPress plugin that allows authenticated users with Subscriber-level access or higher to execute arbitrary shortcodes due to improper validation before calling do_shortcode. This code injection flaw (CWE-94) can lead to limited confidentiality, integrity, and availability impacts without requiring user interaction. The vulnerability affects all versions up to and including 3. 8. 22. Although no known exploits are currently reported in the wild, the ease of exploitation combined with the widespread use of Ninja Forms makes this a notable risk. Organizations using this plugin should prioritize patching or applying mitigations to prevent potential abuse. Countries with significant WordPress usage and large web hosting markets are most at risk. The CVSS score is 6. 3, reflecting medium severity due to the need for authenticated access and limited impact scope.
AI Analysis
Technical Summary
CVE-2024-12238 is a code injection vulnerability classified under CWE-94 affecting the Ninja Forms – The Contact Form Builder That Grows With You plugin for WordPress. The flaw arises because the plugin improperly controls the generation of code by failing to validate user-supplied values before executing them via the WordPress do_shortcode function. This allows authenticated users with Subscriber-level privileges or higher to execute arbitrary shortcodes within the WordPress environment. Shortcodes in WordPress can trigger various actions, including executing PHP code or invoking other plugins' functionality, which can lead to unauthorized actions such as data leakage, modification, or denial of service. The vulnerability affects all versions up to and including 3.8.22. Exploitation does not require user interaction beyond authentication, and the attack surface includes any WordPress site running the vulnerable plugin. Although no public exploits are currently known, the vulnerability's nature and the plugin's popularity make it a significant concern. The CVSS v3.1 base score of 6.3 reflects a medium severity rating, considering network attack vector, low attack complexity, and limited privileges required.
Potential Impact
The potential impact of CVE-2024-12238 includes unauthorized execution of arbitrary shortcodes, which can compromise the confidentiality, integrity, and availability of affected WordPress sites. Attackers with Subscriber-level access could leverage this vulnerability to escalate privileges, execute malicious code, manipulate form data, or disrupt website functionality. This could lead to data breaches, defacement, or denial of service conditions. For organizations relying on Ninja Forms for critical customer interactions or data collection, exploitation could undermine trust and lead to regulatory or reputational damage. Since WordPress powers a significant portion of the web, including many business and government sites, the vulnerability poses a broad risk. However, the requirement for authenticated access limits the scope to insiders or compromised accounts, reducing the likelihood of widespread automated exploitation but increasing risk from targeted attacks or insider threats.
Mitigation Recommendations
To mitigate CVE-2024-12238, organizations should immediately update the Ninja Forms plugin to a version that addresses this vulnerability once available. In the absence of a patch, administrators can restrict Subscriber-level user capabilities to minimize the risk of exploitation, such as disabling shortcode execution for low-privilege users or using security plugins that limit shortcode usage. Implementing strong authentication controls, including multi-factor authentication (MFA), can reduce the risk of account compromise. Regularly auditing user roles and permissions to ensure minimal necessary access is critical. Additionally, monitoring logs for unusual shortcode execution or privilege escalation attempts can provide early detection of exploitation attempts. Web application firewalls (WAFs) with custom rules to detect and block suspicious shortcode usage may also help. Finally, educating users about phishing and credential hygiene reduces the risk of attackers gaining authenticated access.
Affected Countries
United States, United Kingdom, Germany, Canada, Australia, France, India, Brazil, Japan, Netherlands, Italy, Spain
CVE-2024-12238: CWE-94 Improper Control of Generation of Code ('Code Injection') in kstover Ninja Forms – The Contact Form Builder That Grows With You
Description
CVE-2024-12238 is a medium severity vulnerability in the Ninja Forms WordPress plugin that allows authenticated users with Subscriber-level access or higher to execute arbitrary shortcodes due to improper validation before calling do_shortcode. This code injection flaw (CWE-94) can lead to limited confidentiality, integrity, and availability impacts without requiring user interaction. The vulnerability affects all versions up to and including 3. 8. 22. Although no known exploits are currently reported in the wild, the ease of exploitation combined with the widespread use of Ninja Forms makes this a notable risk. Organizations using this plugin should prioritize patching or applying mitigations to prevent potential abuse. Countries with significant WordPress usage and large web hosting markets are most at risk. The CVSS score is 6. 3, reflecting medium severity due to the need for authenticated access and limited impact scope.
AI-Powered Analysis
Technical Analysis
CVE-2024-12238 is a code injection vulnerability classified under CWE-94 affecting the Ninja Forms – The Contact Form Builder That Grows With You plugin for WordPress. The flaw arises because the plugin improperly controls the generation of code by failing to validate user-supplied values before executing them via the WordPress do_shortcode function. This allows authenticated users with Subscriber-level privileges or higher to execute arbitrary shortcodes within the WordPress environment. Shortcodes in WordPress can trigger various actions, including executing PHP code or invoking other plugins' functionality, which can lead to unauthorized actions such as data leakage, modification, or denial of service. The vulnerability affects all versions up to and including 3.8.22. Exploitation does not require user interaction beyond authentication, and the attack surface includes any WordPress site running the vulnerable plugin. Although no public exploits are currently known, the vulnerability's nature and the plugin's popularity make it a significant concern. The CVSS v3.1 base score of 6.3 reflects a medium severity rating, considering network attack vector, low attack complexity, and limited privileges required.
Potential Impact
The potential impact of CVE-2024-12238 includes unauthorized execution of arbitrary shortcodes, which can compromise the confidentiality, integrity, and availability of affected WordPress sites. Attackers with Subscriber-level access could leverage this vulnerability to escalate privileges, execute malicious code, manipulate form data, or disrupt website functionality. This could lead to data breaches, defacement, or denial of service conditions. For organizations relying on Ninja Forms for critical customer interactions or data collection, exploitation could undermine trust and lead to regulatory or reputational damage. Since WordPress powers a significant portion of the web, including many business and government sites, the vulnerability poses a broad risk. However, the requirement for authenticated access limits the scope to insiders or compromised accounts, reducing the likelihood of widespread automated exploitation but increasing risk from targeted attacks or insider threats.
Mitigation Recommendations
To mitigate CVE-2024-12238, organizations should immediately update the Ninja Forms plugin to a version that addresses this vulnerability once available. In the absence of a patch, administrators can restrict Subscriber-level user capabilities to minimize the risk of exploitation, such as disabling shortcode execution for low-privilege users or using security plugins that limit shortcode usage. Implementing strong authentication controls, including multi-factor authentication (MFA), can reduce the risk of account compromise. Regularly auditing user roles and permissions to ensure minimal necessary access is critical. Additionally, monitoring logs for unusual shortcode execution or privilege escalation attempts can provide early detection of exploitation attempts. Web application firewalls (WAFs) with custom rules to detect and block suspicious shortcode usage may also help. Finally, educating users about phishing and credential hygiene reduces the risk of attackers gaining authenticated access.
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Wordfence
- Date Reserved
- 2024-12-05T12:01:07.636Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 699f6e32b7ef31ef0b5979d3
Added to database: 2/25/2026, 9:48:34 PM
Last enriched: 2/26/2026, 5:58:47 AM
Last updated: 2/26/2026, 7:06:01 AM
Views: 1
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2026-25191: Uncontrolled Search Path Element in Digital Arts Inc. FinalCode Ver.5 series
HighCVE-2026-23703: Incorrect default permissions in Digital Arts Inc. FinalCode Ver.5 series
HighCVE-2026-1311: CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in bearsthemes Worry Proof Backup
HighFinding Signal in the Noise: Lessons Learned Running a Honeypot with AI Assistance [Guest Diary], (Tue, Feb 24th)
MediumCVE-2026-2506: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in motahar1 EM Cost Calculator
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.