The vulnerability is a classic stored Cross-Site Scripting (XSS) issue. The application fails to properly sanitize the 'username' field when creating or editing a user. The unsanitized input, which can contain malicious JavaScript, is stored in the application's database. The vulnerability is triggered when an administrator views the user list at the /ajax/listusers endpoint. The backend retrieves the user data, including the malicious username, and sends it as part of a JSON response. The frontend JavaScript then dynamically renders this data into the DOM without escaping it, causing the browser to execute the script in the context of the administrator's session. The key vulnerable functions are admin.new_user, admin.edit_user, and admin.edit_list_user for input injection, and admin.list_users for triggering the payload.
admin.new_usercps/admin.py
admin.edit_usercps/admin.py
admin.edit_list_usercps/admin.py
admin.list_userscps/admin.py
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| calibreweb | pip | <= 0.6.25 |
Ongoing coverage of React2Shell