Skip to content

[Security] XSS in index.php of Phlex and FlexTV #37

@seongil-wi

Description

@seongil-wi

1. Are you hosting your own version of Flex TV, or using the one at https://app.phlexchat.com?

Yes

2. On what OS are you running Flex TV?

Ubuntu

3. Are you using a new instance of XAMPP, or an existing webserver?

Apache 2.4.29, Turn on the AcceptPathInfo in apache2.conf

3b. If not XAMPP, what WebServer stack are you using?

No

4. Have you enabled the sockets module and ensured PHP has write-access to the directory containing Flex TV?

Yes

Description:

Reflected Cross-Site Scripting (XSS) may allow an attacker to execute JavaScript code in the context of the victim’s browser. This may lead to unauthorized actions being performed, unauthorized access to data, stealing of session information, denial of service, etc. An attacker needs to coerce a user into visiting a link with the XSS payload to be properly exploited against a victim.

Steps To Reproduce:

  1. Go to the page with the following link: http://[server]/FlexTV/index.php/');alert('1
  2. Boom!

Where the Issue Occurred
The code below displays the user-controlled input PHP_SELF in index.php without sufficient sanitization:

window.history.pushState({}, "Hide", '<?php echo $_SERVER['PHP_SELF'];?>');

For Phlex:
https://github.com/d8ahazard/Phlex/blob/0a87855726cbce49d0ca84c1a7432f7a3a0458e1/index.php#L237

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions