-
-
Notifications
You must be signed in to change notification settings - Fork 425
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
Allowed console commands can be easily bypassed #483
Comments
There are many of such patterns:
There surely exist many more. |
Obviously I don't understand this constraint. I've found this “feature” helpful. What is the security concern beyond the container? |
The Dockge container needs access to the docker daemon of the host in order to work. If you can control docker, you can control the host (you can mount any path you want and use it with root permissions). So any security issue in this container like the reported one automatically affects the host as well. |
Thanks. I “assumed” this was the same as running the bash terminal on the managed containers. |
suggest allow any command and add disable bash option. |
PLEASE DON'T FIX THIS until you add a way to authenticate with at least with Docker Hub (to avoid the rate limit when updating containers). I was able to use this "exploit" to authenticate. For me personally I'd just say remove the limitation all together, but I understand why some people would want it. Please consider adding a configuration option to allow unrestricted access for those of us that this security issue is not a concern for. On a side note I'm not really sure why this command was not allowed since it is a docker command: |
🛡️ Security Policy
Description
Hi, I've recently discovered that the allowed console commands can be easily bypassed. The current allowed console commands are
docker
,ls
,cd
anddir
. However, these can be easily bypassed by adding&& <YOUR OTHER COMMAND>
after one of the allowed commands. For example, if I want to runhistory
, I could easily executels && history
. In my eyes, this could be a potential security risk.👟 Reproduction steps
&& YOUR_COMMAND
, replacingYOUR_COMMAND
with the command you wish to execute. For example:ls && history
👀 Expected behavior
The command after
&&
should be rejected.😓 Actual Behavior
The command after
&&
gets executed successfully.Dockge Version
1.4.2
💻 Operating System and Arch
Fedora Linux 39 arm64
🌐 Browser
LibreWolf 124.0.1-1
🐋 Docker Version
Docker 26.0.0
🟩 NodeJS Version
No response
📝 Relevant log output
The text was updated successfully, but these errors were encountered: