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

fix uncontrolled data used in path expression from /custom_component #1926

Merged

Conversation

nicoloboschi
Copy link
Contributor

while calling custom_component the check for the path to be child of the cache directory is performed after the path.exists call which could bring to security vulnerabilities

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label May 20, 2024
Copy link

vercel bot commented May 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langflow ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 20, 2024 1:28pm

@dosubot dosubot bot added the bug Something isn't working label May 20, 2024
if not str(path).startswith(user_cache_dir("langflow", "langflow")):
return ""

if not path.exists():

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.
Copy link
Contributor

@ogabrielluiz ogabrielluiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label May 23, 2024
@ogabrielluiz ogabrielluiz merged commit 349443c into langflow-ai:dev May 23, 2024
7 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants