Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed XSS on #347 #348

Merged
merged 2 commits into from
Feb 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,10 @@ Please report all security issues [here](https://github.com/yogeshojha/rengine/i

## Past Security Vulnerabilities

* Reflected XSS on Detail Scan Page via Page Title Parameter, Reported by [omemishra](https://github.com/omemishra)
* [Stored XSS](https://github.com/yogeshojha/rengine/issues/178) on Detail Scan Page via Page Title Parameter, Reported by [omemishra](https://github.com/omemishra)
* [Stored XSS](https://github.com/yogeshojha/rengine/issues/347) on Vulnerability Scan page via URL Parameter, Reported by [Arif Khan, payloadartist](https://twitter.com/payloadartist)

**reNgine thanks the following people for making a responsible disclosure and helping the community make reNgine more safer!**

* [onemishra](https://github.com/omemishra)
* [Arif Khan, payloadartist](https://twitter.com/payloadartist)
10 changes: 5 additions & 5 deletions startScan/templates/startScan/detail_vuln_scan.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,21 +164,21 @@ <h5 class="text-danger">Vulnerability Scan Results</h5>
},
{
"render": function ( data, type, row ) {
return "<a href='"+data+"' target='_blank' class='text-danger'>"+data+"</a>";
return "<a href='"+htmlEncode(data)+"' target='_blank' class='text-danger'>"+htmlEncode(data)+"</a>";
},
"targets": 3,
},
{
"render": function ( data, type, row ) {
// Could be better
if (data && row['matcher_name']) {
return data + "\n" + row['matcher_name'];
return htmlEncode(data) + "\n" + row['matcher_name'];
}
else if (data) {
return data;
return htmlEncode(data);
}
else if (row['matcher_name']) {
return row['matcher_name'].charAt(0).toUpperCase() + row['matcher_name'].slice(1);
return htmlEncode(row['matcher_name']).charAt(0).toUpperCase() + htmlEncode(row['matcher_name']).slice(1);
}
else {
return "";
Expand All @@ -188,7 +188,7 @@ <h5 class="text-danger">Vulnerability Scan Results</h5>
},
{
"render": function ( data, type, row ) {
return data;
return htmlEncode(data);
},
"targets": 5,
},
Expand Down