Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@roman-mibex-2
Copy link

@roman-mibex-2 roman-mibex-2 commented Jan 19, 2024

Before: The notebook renderer allowed XSS attack via a 'text/plain' output element.
Example attack:

{
  "cells": [{
    "cell_type": "code",
    "source": [],
    "outputs": [{
      "output_type": "display_data",
      "data": {
        "text/plain": "<img src onerror=\"alert('XSS at '+origin)\">"
      }
    }]
  }]
}

Vulnerable to a notebook like:

{
  "cells": [{
    "cell_type": "code",
    "source": [],
    "outputs": [{
      "output_type": "display_data",
      "data": {
        "text/plain": "<img src onerror=\"alert('XSS at '+origin)\">"
      }
    }]
  }]
}
@jsvine
Copy link
Owner

jsvine commented Jan 19, 2024

Many thanks for catching that, @roman-mibex-2. Merging.

@jsvine jsvine merged commit 8d41559 into jsvine:master Jan 19, 2024
@roman-mibex-2
Copy link
Author

Thanks for the quick merge.

PS: I've still two other security relevant PS out there from August.

@jsvine
Copy link
Owner

jsvine commented Jan 19, 2024

Yep, should now be handled and available on master and in v0.8.0. Thanks again!

@roman-mibex-2
Copy link
Author

roman-mibex-2 commented Jan 19, 2024

Hmm...I think I didn't get it quite right. If there is angle breakets in the text output, you would expect to see it and not be stripped / interpreted as HTML.
There will be a follow-up PR.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants