usd-2020-0049 | Gophish v0.10.1
Advisory ID: usd-2020-0049
CVE Number: CVE-2020-24709
Affected Product: Gophish
Affected Version: v0.10.1
Vulnerability Type: Stored Cross-Site Scripting
Security Risk: Medium
Vendor URL: https://getgophish.com/
Vendor Status: Fixed
The preview feature of the HTML editor in Landing Pages > New Landing Page allows for execution of XSS payloads that are injected into the source text area. The XSS gets stored when saving a page. A rogue user could exploit an admin by asking him to impersonate him and preview his broken Landing Page.
Additionally, the preview feature of the HTML editor in Email Templates > New Template allows for execution of XSS payloads that are injected into the source text area. The XSS gets stored when saving a template. A rogue user could exploit an admin by asking him to impersonate him and preview his broken email template.
Proof of Concept (PoC)
On the landing page
As a user, create a new email template (/template) include a XSS payload.
An XSS vulnerability can be exploited in various ways. A common attack is to steal sensitive information
from the user and secretly transmit it to the attacker. The gophish session cookie is protected with the
HttpOnly flag and the page does not accept TRACE or TRACK requests. However it might be possible
for an attacker to perform actions with the rights of the user.
It is recommended to treat all input on the website as potentially dangerous. Hence, all output that is dynamically generated based on user-controlled data should be encoded according to its context. The majority of programming languages support standard procedures for encoding meta characters. For example, PHP has the built-in function htmlspecialchars().
Additionally, all input should be validated on the server-side. Where possible, whitelist filters should be used. The more restrictive a filter can be specified, the better the protection it provides. Whitelisting is especially recommended if input values have a well defined format or a list of valid input values exists. Invalid values should not be sanitized and forwarded to the application. Instead, requests with invalid values should be rejected.
- 2020-06-18 First contact request via email@example.com
- 2020-06-22 Vendor responds to initial contact
- 2020-08-07 Vendor publishes a fix
- 2020-09-29 Security advisory released
This security vulnerability was found by Marcus Nilsson of usd AG