Not yet analysed by NVD. Matched on the vendor's record; this may change when NVD has analysed it.
Reach gnupg2 · 4 builds in 4 of 4 releases
full reviewcross-check✓ a member decided
Description · NVD
gpgtar in GnuPG before 2.5.19 can allow file overwrite via crafted data in an archive. When extracting an untrusted archive with --directory (aka -C) into an existing directory containing a pre-existing symlink, gpgtar can follow that symlink and create or overwrite a file outside the selected extraction directory. The write is limited by the extraction user's filesystem permissions. An archive extracted into a fresh empty directory does not have this risk.
Published 2026-10-05NVD
CVSS 3.1Local · no privileges · user interaction
How it is reached
- Attack vector
- Local
- Attack complexity
- High
- Privileges required
- None
- User interaction
- Required
What it costs
- Confidentiality
- None
- Integrity
- Low
- Availability
- Low
- Scope
- Unchanged
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:L
The build is affected: gpgtar from unpatched gnupg 2.4.9 is compiled and installed at /usr/bin/gpgtar, and its extraction code opens output files with a plain es_fopen that follows pre-existing symlinks.
Nothing in the product invokes it. The only GnuPG use found in the Infix sources is the support-bundle script, which runs gpg -c to encrypt a tarball produced by ordinary tar; no finit service, confd code, YANG node, CLI command or web UI handler calls gpgtar or extracts an archive with it.
Reaching the flaw requires a user with shell access to run gpgtar --extract -C <existing dir> by hand on an untrusted archive, into a directory that already contains a symlink. It is not reachable from a network interface.
Evidence 12
`BR2_PACKAGE_GNUPG2=y`, so the package is selected for the target image.
output/.config:3667
The Infix `support` package selects `BR2_PACKAGE_GNUPG2`; `output/.config:5207-5208` has `BR2_PACKAGE_SUPPORT=y` and `BR2_PACKAGE_SUPPORT_ENCRYPT=y`. This is what pulls gnupg2 into the image.
package/support/Config.in:16
The file is empty (0 bytes), and `buildroot/package/gnupg2/` holds no patches and there is no `patches/gnupg2` directory, so the source is unpatched upstream 2.4.9.
output/build/gnupg2-2.4.9/.applied_patches_list
`extract_regular` opens the destination with `es_fopen (fname, "wb,sysopen")` after only `check_suspicious_name`; there is no `lstat`, `O_NOFOLLOW` or `O_EXCL` check (a grep of the file finds none), so a pre-existing symlink in the target directory is followed. The fix is absent.
output/build/gnupg2-2.4.9/tools/gpgtar-extract.c:158
Symlink entries inside the archive are skipped, which matches the CVE's condition that the symlink must already exist in the extraction directory.
output/build/gnupg2-2.4.9/tools/gpgtar-extract.c:290
The source is version 2.4.9 (2025-12-30); the only gpgtar extraction fix listed is T7380 in 2.4.7, with no mention of T8159.
output/build/gnupg2-2.4.9/NEWS:1
`BUILD_GPGTAR_FALSE='#'` and `BUILD_GPGTAR_TRUE=''`, so gpgtar is enabled; `output/build/gnupg2-2.4.9/tools/Makefile:158` adds `gpgtar` to the programs built.
output/build/gnupg2-2.4.9/config.log:9860
The `gpgtar` binary is installed in the target root filesystem. `buildroot/package/gnupg2/gnupg2.mk` only removes `gpgv`, not `gpgtar`.
output/target/usr/bin/gpgtar
The only gnupg call in the product: `tar czf - ... | gpg --batch --yes --pinentry-mode loopback --passphrase-fd 3 -c`. It is symmetric encryption of a locally created tarball, with no `gpgtar` and no extraction.
src/support/support:470-472
confd only references `/usr/bin/gpg` (to check availability for the support-bundle action); it has no reference to `gpgtar`.
src/confd/src/support.c:20
No matches: no script, finit service under `board/common/rootfs/etc/finit.d`, YANG model, CLI or web UI code refers to `gpgtar`.
rg -i gpgtar (whole tree outside the gnupg2 and gpgme build directories)
`libgpgme` (`output/.config:2173`) is selected by podman, and `gpgme-json` and `gpgme-tool` are installed in `output/target/usr/bin`. gpgme can drive `gpgtar` for archive operations, but no product code references gpgme other than the podman package files.
package/podman/Config.in:15
Version and patches
NVD gives the affected range as GnuPG before 2.5.19, which includes 2.4.9. I could not read the upstream advisory or fix commit 7a2692fe5e58 from this environment, so the range and fixed version are taken from the CVE text only. No patch is applied to this build (.applied_patches_list is empty, and the Buildroot package directory has no patches), and the 2.4.9 source in tools/gpgtar-extract.c has no symlink check on extraction, so the fix is not present.
Recommendation
No urgent action is needed; document as not exposed (low severity, local, manual use only).
Pick up the fix with the next routine gnupg2 bump once a 2.4.x release or backport of 7a2692fe5e58 exists.
Optionally, remove /usr/bin/gpgtar from the target with a post-install hook, as gnupg2.mk already does for gpgv, since the product only needs gpg -c for support bundles.
Open questions
I could not confirm from the tree whether upstream has released or plans a 2.4.x backport of the fix, because the advisory and commit were not readable here.
Podman links libgpgme, and gpgme can call gpgtar for archive operations. I did not inspect the podman sources; I believe podman uses gpgme only for image signature verification, but that is from general knowledge rather than this tree, and it is the reason confidence is medium.
Operator-supplied container images or scripts could call gpgtar themselves; that is outside the product's own code.
Members of Kernel Kit decide. Sign in if you are one.