-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
wontfixThis will not be worked onThis will not be worked on
Description
Vulnerability: Stored Cross-Site Scripting (XSS)
Location: Email generation using Installments (Workflows/Posts)
Source: Installment.message field (controllable by sellers via the workflow/post editor, likely submitted to /api/internal/workflows).
Sink:
- The
message_with_inline_syntax_highlighting_and_upsellsmethod in/app/app/models/installment.rb:321processes the rawmessage. While it performs syntax highlighting within<pre><code>blocks, it does not appear to sanitize arbitrary HTML elsewhere in the message. - In the view
/app/app/views/one_off_mailer/email_using_installment.html.erb:4, the result of this method is marked.html_safebefore being passed toRinku.auto_link, and the final output is rendered usingraw.
Exploitation:
- A seller creates or edits a workflow/post (Installment).
- In the message body, the seller includes an XSS payload outside of any
<pre><code>block, e.g.,<img src=x onerror=alert('XSS-Installment')>. - The seller triggers an email to be sent using this installment (e.g., via
OneOffMailer). - The recipient opens the email, and the malicious script executes within their email client.
Impact: Allows sellers to execute arbitrary JavaScript in the context of email recipients viewing posts/workflow emails.
Recommendation: Apply robust HTML sanitization (e.g., using Rails' sanitize helper with appropriate configuration) to the message content before performing syntax highlighting or marking it html_safe. Ensure only safe HTML tags and attributes are allowed in the final output.
Metadata
Metadata
Assignees
Labels
wontfixThis will not be worked onThis will not be worked on