You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stored XSS via Product Name in Rental Expiration Warning Email #5
Source:Link.name field (product name, controllable by sellers).
Sink:
In the rental_expiration_warning method of /app/app/mailers/customer_low_priority_mailer.rb:241, the purchase.link.name is interpolated directly into an HTML string.
This entire string is then marked .html_safe and assigned to the @content instance variable.
This @content variable is likely rendered without further escaping in the mailer's view template.
Exploitation:
A seller creates or edits a product and sets its name to an XSS payload, e.g., <img src=x onerror=alert('XSS-RentalWarning')>.
A user rents this product.
When the rental expiration warning email is generated and sent to the user, the seller's malicious product name is rendered unsanitized, executing the script in the user's email client.
Impact: Allows sellers to execute arbitrary JavaScript in the context of users receiving rental expiration warning emails.
Recommendation: HTML-escape the purchase.link.namebefore interpolating it into the string. For example: ... rental of #{h(purchase.link.name)} will expire .... Alternatively, ensure @content is escaped in the view template, but escaping at the source (before interpolation) is generally preferred.
Activity
msrkp commentedon Apr 14, 2025
tru dat but its in email, so no xss