| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Column names and cell values from evaluation DataFrames are rendered via IPython.display.HTML without sanitization. A crafted DataFrame (e.g. from a shared dataset or model output) can inject arbitrary HTML/JS that executes in the Colab/Jupyter session. Apply html.escape() to both column headers and cell values before interpolation, consistent with the escaping already used elsewhere in the codebase. Fixes both vertexai/evaluation and vertexai/preview/evaluation paths.
| Back | FazBrowse Home | New Git URL |
Description
display_explanations() in notebook_utils.py renders column names and cell values from evaluation DataFrames directly into IPython.display.HTML() without escaping. If a DataFrame contains crafted HTML/JS payloads (e.g. from a shared dataset or model output), they execute in the user's Colab/Jupyter session.
This applies html.escape() to both column headers and cell values before interpolation, matching the pattern already used in _evals_visualization.py.
Fixes both vertexai/evaluation and vertexai/preview/evaluation paths.
Reproducer