fix: Security: Containerized Langflow application is running as root in Cloud / SaaS#1372
Merged
mpawlow merged 1 commit intorelease-saas-0.1from Apr 13, 2026
Conversation
…in Cloud / SaaS Issue - #1369
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.
Issue
Summary
USER rootescalation fromDockerfile.langflowand eliminates the associated customlangflow-entrypoint.pyscript that ran as root to fix bind-mount permissions before dropping privilegesuid=1000) inherited from the base image throughout its entire lifecycle, eliminating the security risk of running as root in Cloud / SaaS deploymentsSecurity Fix: Remove Root User Execution from Langflow Container
Dockerfile.langflowpreviously issued aUSER rootinstruction after copying the entrypoint script, causing the container process to start (and remain) as root in Cloud / SaaS environmentsscripts/langflow-entrypoint.pywas introduced to:chmod 0o777the/app/langflow-databind-mount directoryuid=1000/gid=1000(thelangflowuser) before exec-ing the main processHOMEandUSERenvironment variables after the privilege dropvirtiofslayer does not faithfully propagate host-sidechmodchanges into the containerUSER rootinstruction fromDockerfile.langflowCOPY --chmod=755 scripts/langflow-entrypoint.py /usr/local/bin/langflow-entrypointlayerENTRYPOINT ["langflow-entrypoint"]overridescripts/langflow-entrypoint.pyentirely (43 lines removed)CMD ["langflow", "run", "--host", "0.0.0.0", "--port", "7860"]with no custom entrypoint