Repository navigation
security: fix pickle RCE, XSS, and zip slip vulnerabilities - #1852
Closed
dfgvaetyj3456356-hash wants to merge 3 commits into
Closed
dfgvaetyj3456356-hash wants to merge 3 commits into
dfgvaetyj3456356-hash wants to merge 3 commits into
Conversation
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
Collaborator
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes 5 security vulnerabilities: