[AutoPR- Security] Patch packer for CVE-2026-19589 [HIGH] - #18525
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Patch Analysis: Issue: When installing a plugin, Packer trusted the filename listed in the remote SHA256SUMS file to decide where to write the binary. A malicious release using a name like packer-plugin-docker_v1.2.3_x5.0_linux_amd64/../../tmp/PWNED.zip_ causes Packer to write outside the plugin directory → arbitrary file write. Affected: Azure Linux ships packer 1.9.5 → affected. Upstream fix da95976 targets code that doesn't exist verbatim in 1.9.5, so it is backported. Root cause: In plugins.go::InstallLatest, the entry is parsed/validated but the code then used the raw checksum.Filename to build outputFileName = filepath.Join(outputFolder, ...), so ../ escapes the folder at os.OpenFile(). Fix:
Testing: Upstream's scenario test is in getter_test.go (absent from Azure source) and %check doesn't run the plugin-getter package, so no test is shipped. Verification is done out-of-band via a standalone POC that drives the real InstallLatest with a malicious checksum entry and asserts nothing is written outside the install folder:
Patch Application:
Local Build have been passed:
|
|
/azurepipelines run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. |




Auto Patch packer for CVE-2026-19589.
Autosec pipeline run -> https://dev.azure.com/mariner-org/mariner/_build/results?buildId=1185585&view=results
CVE-2026-19589 : Single Patch Backporter Pipeline Run -> https://dev.azure.com/mariner-org/mariner/_build/results?buildId=1185590&view=results
Merge Checklist
All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)
*-staticsubpackages, etc.) have had theirReleasetag incremented../cgmanifest.json,./toolkit/scripts/toolchain/cgmanifest.json,.github/workflows/cgmanifest.json)./LICENSES-AND-NOTICES/SPECS/data/licenses.json,./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md,./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)*.signatures.jsonfilessudo make go-tidy-allandsudo make go-test-coveragepassSummary
What does the PR accomplish, why was it needed?
Change Log
Does this affect the toolchain?
YES/NO
Associated issues
Links to CVEs
Test Methodology