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

Reflective XSS from useragent #3954

Closed
rcubetrac opened this issue Oct 4, 2012 · 3 comments
Closed

Reflective XSS from useragent #3954

rcubetrac opened this issue Oct 4, 2012 · 3 comments

Comments

@rcubetrac
Copy link

Reported by bladeswords on 4 Oct 2012 12:48 UTC as Trac ticket #1488737

At the URL

/?_task=login&_action=error&_code=0x199

which is triggered from detecting an incompatible browser user agent set your user agent to something XSS for example

<script>alert(1);</script>

The effected code is located in program/steps/utils/error.inc

The vulnerable code is:

  $user_agent =  $_SERVER[ $__error_title = 'Your browser does not suit the requirements for this applic$
  $__error_text = <<<EOF
<i>Supported browsers:</i><br />
&raquo; &nbsp;Microsoft Internet Explorer 6+<br />
...snip...

<p><i>Your configuration:</i><br />
$user_agent</p>

To fix I changed where the $user_agent variable is assigned

  $user_agent =  htmlentities($_SERVER['HTTP_USER_AGENT']('HTTP_USER_AGENT'];

));

Migrated-From: http://trac.roundcube.net/ticket/1488737

@rcubetrac
Copy link
Author

Comment by @thomascube on 4 Oct 2012 15:03 UTC

Fixed in commit [(master) and 0ce66ba(95d2892]) (release 0.8)

@rcubetrac
Copy link
Author

Milestone changed by @thomascube on 4 Oct 2012 15:03 UTC

later => 0.8.2

@rcubetrac
Copy link
Author

Status changed by @thomascube on 4 Oct 2012 15:03 UTC

new => closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant