Skip to content

Lack of escaping on some pages can lead to XSS exposure (CVE-2020-7106) #3191

Description

@0xfatty

Describe the bug
Data source input validation error leads to Stored XSS within Description after creating a device with Malicious code embedded in Description field.

To Reproduce
Steps to reproduce the behavior:

  1. Navigate to Console -> Create -> New Device
  2. In Description field, input script payload: <svg/onload=alert(1)>
  3. Fill out the rest of the form as normal
  4. Click Save. After the first click, there will be an error dialog saying Whitelisting is ON (yes, I turned it on this time). However, I was still able to save the "New Device" form by clicking "Save" once again.
  5. After the message of "Successfully operated", click on "Data Sources" on the top right menu. XSS dialog will pop up.

You might ask me questions about CSP and the whitelisting thing in config.php:
If I turned the whitelisting feature ON? YES
If I fixed html.php to append CSP policy? YES

Screenshots

Metadata

Metadata

Assignees

No one assigned

    Labels

    SECURITYA security issue reported through CVEbugUndesired behaviourresolvedA fixed issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions