JLSEC-2026-2367: gpgtar in GnuPG before 2.5.19 can allow file overwrite via crafted data in an archive. When...
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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
julia/GnuPG_jllto a version that resolves this vulnerability.Fixed in 2.5.21+0
Event History
Child vulnerabilities
Contains the following vulnerabilities.
Frequently Asked Questions
Which extraction workflows are exposed?
The risk applies when gpgtar extracts an untrusted archive with --directory (or -C) into an existing directory that already contains a symlink. Extracting into a fresh, empty directory does not have this risk.
What conditions must an attacker satisfy to cause an overwrite?
An attacker needs a crafted archive and must induce a user to extract it. The target extraction directory must contain a pre-existing symlink that gpgtar follows; any resulting write is limited to locations writable by the extracting user.
What can be done when an update is not immediately available?
Do not extract untrusted archives into existing directories containing symlinks. Use a freshly created empty extraction directory instead, and avoid using --directory or -C with untrusted archives where possible.