Skip to content

Cross-site scripting (XSS) vulnerability in user.php #72

Description

@m33x

Hi there,

the user $_GET['user'] parameter is vulnerable to arbitrary Javascript code injection.

Please change

$user = $_GET['user'];

to

$user = htmlspecialchars($_GET['user'], ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8', true);

screen shot 2014-06-11 at 23 47 46

I haven't checked the rest of the application yet, but please consider this everywhere.

For Strings use:

$var_clean = htmlspecialchars($var, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8', true);

For Integer use:

$var_clean = intval($var);

For Floats use:

$var_clean = floatval($var);

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions