CVE-2022-35587: ForkCMS XSS via `publish_on_date` parameter
Summary
CVE-2022-35587: ForkCMS XSS via publish_on_date parameter. Affects forkcms/forkcms versions < 5.11.0. Fixed in 5.11.0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
ForkCMS is an open-source content management system (CMS) written in PHP. It provides a user-friendly interface for managing website content, including pages, menus, and modules. ForkCMS is widely used by developers and website administrators to create and maintain dynamic websites. However, in version 5.9.3 of ForkCMS, a cross-site scripting (XSS) vulnerability was discovered, which could allow remote attackers to inject malicious JavaScript code into the application. This vulnerability was addressed and fixed in version 5.11.0 of ForkCMS.
Vulnerability Detail
The vulnerability (CVE-2022-35587) in ForkCMS version 5.9.3 is due to improper input sanitization of the publish_on_date parameter. Attackers can exploit this vulnerability by injecting malicious JavaScript code into the parameter, which is then executed by the victim's browser. This can lead to various consequences, including unauthorized access to sensitive information, session hijacking, and potential malware installation. The severity of this vulnerability is rated as MODERATE with a CVSS score of 4.8 (CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N).
How To Fix
Minimum fixed version
5.11.0
This is the first release that contains the fix.
composer require forkcms/forkcms:5.11.0
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If upgrading to the latest version is not immediately feasible, a temporary workaround can be implemented by manually sanitizing the publish_on_date parameter before processing it. This can be done by using a secure input filtering function or a dedicated XSS protection library. Here is an example of how to sanitize the parameter using PHP's htmlspecialchars function:
$publishOnDate = htmlspecialchars($_POST['publish_on_date'], ENT_QUOTES, 'UTF-8');
It is important to note that this workaround is not a permanent solution and should only be considered as a temporary measure until the application can be upgraded to a secure version.
Conclusion
In conclusion, the ForkCMS version 5.9.3 is vulnerable to a cross-site scripting (XSS) attack through the publish_on_date parameter. This vulnerability can be mitigated by upgrading to version 5.11.0 or later. In the meantime, developers can implement a temporary workaround by sanitizing the parameter manually. It is crucial to address this vulnerability promptly to protect the application and its users from potential exploitation. For further assistance and support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for forkcms/forkcms →
FAQ
ForkCMS is an open-source content management system (CMS) written in PHP. It provides a user-friendly interface for managing website content, including pages, menus, and modules.
Cross-site scripting (XSS) is a type of security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users. This can lead to various consequences, including unauthorized access to sensitive information and potential malware installation.
This vulnerability can be exploited by remote attackers who can inject malicious JavaScript code into the publish_on_date parameter of ForkCMS. When a victim accesses a page or performs an action that triggers the execution of this parameter, the injected code is executed by the victim's browser.
Yes, this vulnerability has been fixed in version 5.11.0 of ForkCMS. It is recommended to upgrade to this version or later to mitigate the risk of exploitation.
The severity of this vulnerability is rated as MODERATE with a CVSS score of 4.8 (CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N). It is important to address this vulnerability promptly to prevent potential security breaches.
Related vulnerabilities
Recent vulnerabilities recorded for forkcms/forkcms.