Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NO-ISSUE] Prevent directory escape bypass through repeated URL decoding #4891

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tbonelee
Copy link
Contributor

@tbonelee tbonelee commented Nov 3, 2024

What is this PR for?

This PR addresses an issue in NotebookService where the notebook path validation only performs a single decoding pass.
This allowed a malicious user to bypass validation by double-encoding the ".." token.
By implementing the repeated decoding, we can prevent this bypass.
Additionally, to prevent excessive decoding attempts, a maximum limit on the number of decoding attempts has been added.

What type of PR is it?

Hot Fix

How should this be tested?

  • CI

Questions:

  • Does the license files need to update? No
  • Is there breaking changes for older versions?
    • There may be minor compatibility issues if a user relies on multiple encoded paths, but this is unlikely in realistic scenarios.
  • Does this needs documentation? No

@tbonelee
Copy link
Contributor Author

tbonelee commented Nov 3, 2024

cc @jongyoul

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.

1 participant