Skip to content

security: fix pickle RCE, XSS, and zip slip vulnerabilities - #1852

Closed
dfgvaetyj3456356-hash wants to merge 3 commits into
Data-Centric-AI-Community:developfrom
dfgvaetyj3456356-hash:security/fix-pickle-xss-zip-slip
Closed

dfgvaetyj3456356-hash wants to merge 3 commits into
Data-Centric-AI-Community:developfrom
dfgvaetyj3456356-hash:security/fix-pickle-xss-zip-slip

Conversation

@dfgvaetyj3456356-hash

Copy link
Copy Markdown

This PR fixes 5 security vulnerabilities:

  1. Pickle RCE in serialize_report.py: Added rusted_source parameter with RuntimeWarning for pickle.loads to prevent arbitrary code execution from untrusted pickle files.
  2. Pickle RCE in dataframe.py: Added rusted_source parameter with RuntimeWarning for pd.read_pickle to prevent arbitrary code execution from untrusted pickle files.
  3. XSS in HTML reports (templates.py): Enabled Jinja2 �utoescape to prevent cross-site scripting in HTML report generation.
  4. XSS in alerts tooltip (alerts.py): Escaped HTML in the tooltip data-bs-title attribute to prevent injected script execution.
  5. Zip Slip in common.py: Validated zip extraction paths to prevent directory traversal attacks when extracting archives.

dfgvaetyj3456356-hash and others added 3 commits May 28, 2026 06:17
Adds a 30-second timeout to requests.get() calls in cache.py and
common.py to prevent indefinite hanging when remote servers are
unresponsive. This mitigates potential denial-of-service via slow
or malicious endpoints.
- serialize_report.py: add trusted_source parameter with RuntimeWarning for pickle.loads
- dataframe.py: add trusted_source parameter with RuntimeWarning for pd.read_pickle
- templates.py: enable Jinja2 autoescape to prevent XSS in HTML reports
- alerts.py: escape HTML in tooltip data-bs-title attribute
- common.py: validate zip extraction paths to prevent zip slip
@fabclmnt

Copy link
Copy Markdown
Collaborator

Hi @dfgvaetyj3456356-hash,

thank you for your contribution. I’m closing this PR because it can’t be merged as-is: enabling Jinja autoescape escapes the pre-rendered HTML the report is built from, so every report renders as raw markup instead of content. The pickle warnings also fire on every legitimate load() without blocking anything, and zipfile.extractall already strips .. and absolute paths.

The request timeouts are a good change; feel free to open a PR with those. If you have a concrete reproduction for an XSS (for example via column names), please by openning an issue with the steps, and we’ll address it with targeted escaping and a test.

@fabclmnt fabclmnt closed this Oct 30, 2026
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