Cross-site Scripting Vulnerability in CMSSecurity BackURL in silverstripe/framework
Summary
GHSA-r85g-7jpv-8xrx: silverstripe/framework has Cross-site Scripting vulnerability in CMSSecurity BackURL. Affects silverstripe/framework across 4 version ranges.
>= 3.1.0-rc1, < 3.1.21
>= 3.2.0-rc1, < 3.2.6
>= 3.3.0-rc1, < 3.3.4
>= 3.4.0-rc1, < 3.4.2
Fixed in 4 releases; the minimum fixed version depends on the release line you run. 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
silverstripe/framework is an open-source PHP framework used for building websites and web applications. It provides a range of features and functionalities to developers, including content management, templating, and database management. However, a vulnerability has been identified in the CMSSecurity BackURL functionality of the framework.
Vulnerability Detail
The vulnerability in silverstripe/framework allows for Cross-site Scripting (XSS) attacks through the CMSSecurity BackURL parameter. This parameter is used to redirect users to a specific page after logging into the CMS. However, due to incorrect URL encoding, an attacker can inject malicious scripts into the BackURL parameter, which will be executed when the user is redirected. This can lead to various security risks, including unauthorized access to sensitive information, session hijacking, and the potential for further exploitation.
How To Fix
Fixed versions by release line
The minimum fixed version depends on the release line you run.
-
>= 3.1.0-rc1, < 3.1.213.1.21composer require silverstripe/framework:3.1.21 -
>= 3.2.0-rc1, < 3.2.63.2.6composer require silverstripe/framework:3.2.6 -
>= 3.3.0-rc1, < 3.3.43.3.4composer require silverstripe/framework:3.3.4 -
>= 3.4.0-rc1, < 3.4.23.4.2composer require silverstripe/framework:3.4.2
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
If updating to the latest version is not immediately feasible, a temporary workaround can be implemented by manually encoding the BackURL parameter before redirecting the user. This can be done using PHP's urlencode() function or a similar encoding method. By properly encoding the parameter, the vulnerability can be mitigated until a permanent fix can be applied.
Conclusion
The Cross-site Scripting vulnerability in CMSSecurity BackURL in silverstripe/framework can pose significant security risks to web applications built using this framework. It is crucial to update to the latest version of silverstripe/framework or apply the recommended workaround to mitigate the risk of XSS attacks. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for silverstripe/framework →
FAQ
silverstripe/framework is an open-source PHP framework used for building websites and web applications. It provides developers with a range of features and functionalities to streamline the development process.
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 security risks, including unauthorized access to sensitive information and the potential for further exploitation.
The CMSSecurity BackURL parameter is used to redirect users to a specific page after logging into the CMS. However, due to incorrect URL encoding, an attacker can inject malicious scripts into the BackURL parameter, which will be executed when the user is redirected.
The potential risks associated with this vulnerability include unauthorized access to sensitive information, session hijacking, and the potential for further exploitation of the affected system.
To mitigate the risk of this vulnerability, it is recommended to update silverstripe/framework to the latest version available. Additionally, implementing proper input validation and output encoding practices can help prevent XSS attacks.
References
Related vulnerabilities
Recent vulnerabilities recorded for silverstripe/framework.