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

feat(XSS): also scan filenames for XSS #2730

Closed
wants to merge 2 commits into from
Closed

feat(XSS): also scan filenames for XSS #2730

wants to merge 2 commits into from

Conversation

lifeforms
Copy link
Member

@lifeforms lifeforms commented Aug 5, 2022

This PR addresses #2699.

Bug Bounty references: ULYKOFYK-1, EOJQZ6XX.

It will solve false negatives such as /index.php/%3Csvg/onload=alert()

I've reviewed our XSS rules, and on first sight, the rules seem specific enough to allow us passing the filename to them and not be flooded by false positives.

Added REQUEST_FILENAME to all XSS rules, except for @detectXSS, which if I recall correctly, I tried earlier to run on the filename but had to revert because the number of false positives was not tolerable for a default install. It is active in PL2 though.

REQUEST_FILENAME (not REQUEST_URI) seems good enough to me to add to the XSS rules, as the additional query parameters in REQUEST_URI are already passed to the rules through ARGS_NAMES and ARGS.

Now there is a chance that we find false positives, so that maybe we have to remove the filename scan from some of the rules. To improve confidence, I can run these rules on some traffic and see how it behaves.

@theseion theseion self-requested a review August 15, 2022 18:47
@theseion theseion requested a review from fzipi August 15, 2022 18:52
@lifeforms lifeforms closed this by deleting the head repository Sep 8, 2022
@lifeforms
Copy link
Member Author

lifeforms commented Sep 8, 2022

Ah, dammit. I threw away my fork to start over with a clean fork. Forgot that this PR was not merged yet. I will remake this PR later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⭐ bug bounty Comes from our Bug Bounty program
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants