Skip to content

XSS in importCSS #12

@cnsgithub

Description

@cnsgithub

Prepared stylesheet link may contain malicious href that must be properly escaped before writing it to the DOM.

Reproducer: http://jsfiddle.net/x3stw1nh/4/

<html>
<head>
  <link type='text/css' rel='stylesheet' href='about:blank&#x27;/&gt;&lt;script&gt;alert(&#x27;xss&#x27;);&lt;/script&gt;&lt;br' />
  <script>
  $("body").jqprint();
  </script>
</head>
<body>
test
</body>
</html>

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