Security scanners have reported a XSS vulnerability in the login link when html tags are included in the page url.

Browser request:
example.com/?<script>badscript</script>
Resulting login block link:
<a href="https://example.com/?<script>badscript</script>">Login</a>

The attached patch decodes the url, then passes it through Drupal's filter_xss function to remove any html tags present in the url. This has resolved the issue with our scanners.

As a side note, this may be more appropriate to patch in request_uri() since that function is failing to filter out malicious code.

CommentFileSizeAuthor
cosign.module.patch511 bytesmdulzo
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ksteinhoff’s picture

Assigned: Unassigned » ksteinhoff

Many thanks for the report and the patch!

ksteinhoff’s picture

I'm not able to reproduce this in any browser I've tested (Firefox, Safari, Chrome and Opera on multiple platforms, and
IE6, 7, and 8), so I think it may be a false positive from the scanner. What scanner did you use for this test?

I'll apply the patch to the next release as a precaution.

mlhess’s picture

Status: Needs review » Closed (won't fix)

This is not the correct location to report security issues.

Please see:

http://drupal.org/security-team