Open
Fix Dependabot vulnerability for container archive handling#1065
Conversation
Copilot stopped work on behalf of
leogr due to an error
September 1, 2026 09:17
Copilot stopped work on behalf of
leogr due to an error
September 1, 2026 09:24
Copilot stopped work on behalf of
leogr due to an error
September 1, 2026 09:33
…e to v28.5.1+incompatible Co-authored-by: Leonardo Grasso <me@leonardograsso.com> Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
Co-authored-by: Leonardo Grasso <me@leonardograsso.com> Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
leogr
force-pushed
the
copilot/fix-dependabot-vulnerability
branch
from
September 1, 2026 09:49
53874d0 to
43be80f
Compare
leogr
marked this pull request as ready for review
September 1, 2026 09:57
leogr
approved these changes
Sep 1, 2026
Contributor
|
LGTM label has been added. DetailsGit tree hash: 423009b5468f5f4f386ccc6e5b74dfbfe67c5096 |
leogr
approved these changes
Sep 1, 2026
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Copilot, leogr The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
Progress
github.com/docker/dockerdependency by replacinghomedir.Get()with standard library / helpergo mod tidyand verify downgrade ofgithub.com/docker/dockerto non-vulnerablev28.5.1+incompatibleHomeDirReachability Assessment
Docker: PUT /containers/{id}/archive executes container binary on the host)PUT /containers/{id}/archiveAPI handling with compressed archives (xz/gzip), which decompressed using binaries resolved from the container's filesystem.falcoctlis a CLI tool that does not run a Docker daemon or expose/call thePUT /containers/{id}/archivecontainer archive endpoint. Infalcoctl,github.com/docker/dockerwas only used forhomedir.Get()to determine user home directory paths, which has now been replaced with a native helper functionutils.HomeDir()using Go's standard libraryos.UserHomeDir(). The transitive dependency ondockerpulled in viadriverkitis also downgraded tov28.5.1+incompatible. The codebase is not actively exposed to this vulnerability, and this change resolves the Dependabot security alert.Original prompt
This section details the Dependabot vulnerability alert you should resolve
<alert_title>Docker:
PUT /containers/{id}/archiveexecutes container binary on the host</alert_title><alert_description>## Summary
When a user uploads a compressed archive into a container, a malicious image can execute arbitrary code with daemon (host root) privileges.
Details
When handling
PUT /containers/{id}/archiverequests with compressed archives, the daemon decompresses them using external system binaries. Due to incorrect ordering of operations, these binaries are resolved from the container's filesystem rather than the host's. A container image that includes a trojanized decompression binary can achieve code execution as the daemon process whenever a compressed archive is uploaded to that container.The executed binary runs with the daemon's full privileges, including host root UID and unrestricted capabilities.
Impact
Arbitrary code execution as host root, crossing the container-to-host trust boundary.
Conditions for exploitation
docker cp -or by calling thePUT /containers/{id}/archiveAPI directly with compressed content.Not affected
Standard
docker cpusage is not affected, because the CLI sends uncompressed tar by default:This can only be exploited when explicitly passing a xz or gzip-compressed archive to
docker cpor thePUT /containers/{id}/archiveAPI, for example:Decompression formats using pure Go implementations (bzip2, zstd, and gzip when the container image does not contain an
unpigzbinary) are also not affected.Workarounds
PUT /containers/{id}/archiveendpoint.high
https://github.com/moby/moby/security/advisories/GHSA-x86f-5xw2-fm2r https://nvd.nist.gov/vuln/detail/CVE-2026-41567 https://github.com/advisories/GHSA-x86f-5xw2-fm2rGHSA-x86f-5xw2-fm2r, CVE-2026-41567
github.com/docker/docker
go
<vulnerable_versions>= v28.5.2+incompatible</vulnerable_versions>
<patched_version></patched_version>
<manifest_path>go.mod</manifest_path>
<task_instructions>Resolve this alert by updating the affected package to a non-vulnerable version. Prefer the lowest non-vulnerable version (see the patched_version field above) over the latest to minimize breaking changes. Include a Reachability Assessment section in the PR description. Review the alert_description field to understand which APIs, features, or configurations are affected, then search the codebase for usage of those specific items. If the vulnerable code path is reachable, explain how (which files, APIs, or call sites use the affected functionality) and note that the codebase is actively exposed to this vulnerability. If the vulnerable code path is not reachable, explain why (e.g. the affected API is never called, the vulnerable configuration is not used) and note that the update is primarily to satisfy vulnerability scanners rather than to address an active risk. If the advisory is too vague to determine reachability (e.g. 'improper input validation' with no specific API named), state that reachability could not be determined and explain why. Include a confidence level in the reachability assessment (e.g. high confidence if the advisory names a specific API and you confirmed it is or is not called, low confidence if the usage is indirect and hard to trace). If no patched version is available, check the alert_description field for a Workarounds section — the advisory may describe configuration changes or usage patterns that mitigate the vulnerability without a version update. If a workaround is available, apply it and leave a code comment referencing the advisory identifier explaining it is a temporary mitigation. If neither a patch nor a workaround is available, explain in the PR description why the alert cannot be resolved automatically so a human reviewer can take over. Inspect the repository to determine which package manager is used (e.g. lock files, config files, build scripts) and use that tooling to perform the update — do not edit lock files directly. If the version constraint in the manifest (e.g. package.json, Gemfile, pyproject.toml) caps the version below the fix, update the constraint first. For transitive dependencies, determine whether it is simpler to update the direct dependency that pulls in the vulnera...