-
Notifications
You must be signed in to change notification settings - Fork 215
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
[SECURITY/CVE/CRITICAL] Meshcentral is injected during docker build run #2450
Comments
Thanks for the report. We're looking into it. |
@iocron thanks for reporting this issue, I looked into it quite in detail. The CVE is correct but Meshcentral is not injected at all. In fact, there is no Meshcentral binary in the container. I searched for it in the entire filesystem in a built container. devbox@f85313a7724c:/code$ find / -type f -name "*meshcentral*" 2>/dev/null
/nix/store/5kli0hmba13hczv8gni1gvzi4ir8w21b-nixpkgs/nixpkgs-25.05pre720687.5a48e3c2e435/nixos/modules/services/admin/meshcentral.nix
/nix/store/j0jlb33bm31w347w43051hbffgh616jr-source/nixos/modules/services/admin/meshcentral.nix The first path is part of the nixpkgs package itself that contains a few That said, if you add RUN devbox run -- echo "Installed Packages."
RUN nix-collect-garbage -d
RUN nix-store --optimise |
@mohsenari @ipince You're welcome, happy to help. @mohsenari Thats incorrect. There are multiple places, and the binary does exist, let me explain it below shortly (due to restricted time I only checked a small portion):
|
@iocron I went through and looked at the Docker Desktop results, and this seem like a false-positive that's detecting the nixpkgs sometimes includes files like this so it can auto-generate parts of the build process for packages. In this case, it uses the package.json to download/hash dependencies of meshcentral and update the package. To be clear, none of this is actually happening and meshcentral isn't actually being built unless you install meshcentral with Devbox or Nix. It's just in the container because Nix packages are all defined in the same git repo. I looked in the paths you mentioned (including in |
What happened?
The command
devbox generate dockerfile
generates a docker file that pulls dangerous/malicious dependencies (meshcentral 1.1.6 package, ~500MB) during the docker build process (e.g.docker build -t devbox-empty-test2 .
).How to reproduce:
Looking at the Dockerfile (
cat Dockerfile
) reveals:During the execution of
RUN /bin/sh -c devbox run -- echo "Installed Packages." # buildkit
the dangerous dependencies are pulled through the meshcentral 1.1.6 package. This is very disturbing, also because the package does not make any sense to exist in the first place on a empty Project.Inspect the generated docker image by using docker-desktop (or a suitable vuln/dep scanning tool):
Just the meshcentral 1.1.6 package alone has 4 CVEs. 3 with high severity and 1 with critical severity. The CVEs are:
CVE-2023-51837
CVE-2024-26135
CVE-2023-51842
CVE-2023-51838
Steps to reproduce
Command
No response
devbox.json
Devbox version
0.13.7
Nix version
nix (Nix) 2.24.7
What system does this bug occur on?
macOS (Apple Silicon)
Debug logs
macOS 14.6.1 (Apple M1 Pro)
The text was updated successfully, but these errors were encountered: