CVE-2018-20482
GNU Tar through 1.30, when --sparse is used, mishandles file shrinkage during read access, which...
GNU Tar through 1.30, when --sparse is used, mishandles file shrinkage during read access, which allows local users to cause a denial of service (infinite read loop in sparse_dump_region in sparse.c) by modifying a file that is supposed to be archived by a different user's process (e.g., a system backup running as root).
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- High
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
4.7
GNU Tar through 1.30, when --sparse is used, mishandles file shrinkage during read access, which allows local users to cause a denial of service (infinite read loop in sparse_dump_region in sparse.c) by modifying a file that is supposed to be archived by a different user's process (e.g., a system backup running as root).
- Record
CVE-2018-20482- CVSS 3.1
- 4.7 Medium
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H - CVSS 2.0
- 1.9 Low
AV:L/AC:M/Au:N/C:N/I:N/A:P - Weakness
- CWE-835
- Updated
- 2026-11-02
CVE List No score
GNU Tar through 1.30, when --sparse is used, mishandles file shrinkage during read access, which allows local users to cause a denial of service (infinite read loop in sparse_dump_region in sparse.c) by modifying a file that is supposed to be archived by a different user's process (e.g., a system backup running as root).
- Record
CVE-2018-20482- Updated
- 2026-11-02
EUVDEUVD-2018-13036 No score
GNU Tar through 1.30, when --sparse is used, mishandles file shrinkage during read access, which allows local users to cause a denial of service (infinite read loop in sparse_dump_region in sparse.c) by modifying a file that is supposed to be archived by a different user's process (e.g., a system backup running as root).
- Record
EUVD-2018-13036- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-pm5x-48pq-67cq
4.7
GNU Tar through 1.30, when --sparse is used, mishandles file shrinkage during read access, which...
GNU Tar through 1.30, when --sparse is used, mishandles file shrinkage during read access, which allows local users to cause a denial of service (infinite read loop in sparse_dump_region in sparse.c) by modifying a file that is supposed to be archived by a different user's process (e.g., a system backup running as root).
- Record
GHSA-pm5x-48pq-67cq- CVSS 3.1
- 4.7 Medium
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-835
- Updated
- 2026-11-02
OSVALPINE-CVE-2018-20482
4.7
GNU Tar through 1.30, when --sparse is used, mishandles file shrinkage during read access, which allows local users to cause a denial of service (infinite read loop in sparse_dump_region in sparse.c) by modifying a file that is supposed to be archived by a different user's process (e.g., a system backup running as root).
- Record
ALPINE-CVE-2018-20482- CVSS 3.1
- 4.7 Medium
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVBELL-CVE-2018-20482
4.7
CVE-2018-20482 does not affect BellSoft software
- Record
BELL-CVE-2018-20482- CVSS 3.1
- 4.7 Medium
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
Show 11 moreShow less
OSV
4.7
GNU Tar through 1.30, when --sparse is used, mishandles file shrinkage during read access, which allows local users to cause a denial of service (infinite read loop in sparse_dump_region in sparse.c) by modifying a file that is supposed to be archived by a different user's process (e.g., a system backup running as root).
- Record
CVE-2018-20482- CVSS 3.1
- 4.7 Medium
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-03
OSVDEBIAN-CVE-2018-20482
4.7
GNU Tar through 1.30, when --sparse is used, mishandles file shrinkage during read access, which allows local users to cause a denial of service (infinite read loop in sparse_dump_region in sparse.c) by modifying a file that is supposed to be archived by a different user's process (e.g., a system backup running as root).
- Record
DEBIAN-CVE-2018-20482- CVSS 3.1
- 4.7 Medium
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2018-20482
4.7
GNU Tar through 1.30, when --sparse is used, mishandles file shrinkage during read access, which allows local users to cause a denial of service (infinite read loop in sparse_dump_region in sparse.c) by modifying a file that is supposed to be archived by a different user's process (e.g., a system backup running as root).
- Record
UBUNTU-CVE-2018-20482- CVSS 3.1
- 4.7 Medium
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H - CVSS 3.0
- 4.7 Medium
CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVMGASA-2019-0034 No score
GNU tar has been updated to fix CVE-2018-20482
GNU Tar through 1.30, when --sparse is used, mishandles file shrinkage during read access, which allows local users to cause a denial of service (infinite read loop in sparse_dump_region in sparse.c) by modifying a file that is supposed to be archived by a different user's process (e.g., a system backup running as root).
- Record
MGASA-2019-0034- Updated
- 2026-11-02
OSVopenSUSE-SU-2019:1237-1 No score
Security update for tar
This update for tar fixes the following issues:
Security issues fixed:
- CVE-2019-9923: Fixed a denial of service while parsing certain archives with malformed extended headers in pax_decode_header() (bsc#1130496).
- CVE-2018-20482: Fixed a denial of service when the '--sparse' option mishandles file shrinkage during read access (bsc#1120610).
This update was imported from the SUSE:SLE-15:Update update project.
- Record
openSUSE-SU-2019:1237-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:11422-1 No score
tar-1.34-2.2 on GA media
These are all security issues fixed in the tar-1.34-2.2 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:11422-1- Updated
- 2026-11-02
OSVSUSE-SU-2019:0926-1 No score
Security update for tar
This update for tar fixes the following issues:
Security issues fixed:
- CVE-2019-9923: Fixed a denial of service while parsing certain archives with malformed extended headers in pax_decode_header() (bsc#1130496).
- CVE-2018-20482: Fixed a denial of service when the '--sparse' option mishandles file shrinkage during read access (bsc#1120610).
- Record
SUSE-SU-2019:0926-1- Updated
- 2026-11-02
OSVSUSE-SU-2019:14215-1 No score
Security update for tar
This update for tar to version 1.27.1 fixes the following issues:
tar 1.27.1 brings following changes (jsc#ECO-339)
- Sparse files with large data
- No backticks in quoting
- --owner and --group names and numbers
- Support for POSIX ACLs, extended attributes and SELinux context.
- Passing command line arguments to external commands.
- New configure option --enable-gcc-warnings, intended for debugging.
- New warning control option --warning=[no-]record-size
- New command line option --keep-directory-symlink
- Fix unquoting of file names obtained via the -T option.
- Fix GNU long link header timestamp (backward compatibility).
Security issues fixed:
- CVE-2019-9923: Fixed a denial of service while parsing certain archives with malformed extended headers in pax_decode_header() (bsc#1130496).
- CVE-2018-20482: Fixed a denial of service when the '--sparse' option mishandles file shrinkage during read access (bsc#1120610).
- Record
SUSE-SU-2019:14215-1- Updated
- 2026-11-02
OSVSUSE-SU-2020:2806-1 No score
Security update for tar
This update for tar fixes the following issues:
Security issues fixed:
- CVE-2019-9923: Fixed a denial of service while parsing certain archives with malformed extended headers in pax_decode_header() (bsc#1130496).
- CVE-2018-20482: Fixed a denial of service when the '--sparse' option mishandles file shrinkage during read access (bsc#1120610).
- Record
SUSE-SU-2020:2806-1- Updated
- 2026-11-02
OSVSUSE-SU-2022:1548-1 No score
Security update for tar
This update for tar fixes the following issues:
-
CVE-2021-20193: Fixed a memory leak in read_header() in list.c (bsc#1181131).
-
CVE-2019-9923: Fixed a null-pointer dereference in pax_decode_header in sparse.c (bsc#1130496).
-
CVE-2018-20482: Fixed infinite read loop in sparse_dump_region in sparse.c (bsc#1120610).
-
Update to GNU tar 1.34:
- Fix extraction over pipe
- Fix memory leak in read_header (CVE-2021-20193) (bsc#1181131)
- Fix extraction when . and .. are unreadable
- Gracefully handle duplicate symlinks when extracting
- Re-initialize supplementary groups when switching to user privileges
-
Update to GNU tar 1.33:
- POSIX extended format headers do not include PID by default
- --delay-directory-restore works for archives with reversed member ordering
- Fix extraction of a symbolic link hardlinked to another symbolic link
- Wildcards in exclude-vcs-ignore mode don't match slash
- Fix the --no-overwrite-dir option
- Fix handling of chained renames in incremental backups
- Link counting works for file names supplied with -T
- Accept only position-sensitive (file-selection) options in file list files
-
prepare usrmerge (bsc#1029961)
-
Update to GNU 1.32
- Fix the use of --checkpoint without explicit --checkpoint-action
- Fix extraction with the -U option
- Fix iconv usage on BSD-based systems
- Fix possible NULL dereference (savannah bug #55369) [bsc#1130496] [CVE-2019-9923]
- Improve the testsuite
-
Update to GNU 1.31
- Fix heap-buffer-overrun with --one-top-level, bug introduced with the addition of that option in 1.28
- Support for zstd compression
- New option '--zstd' instructs tar to use zstd as compression program. When listing, extractng and comparing, zstd compressed archives are recognized automatically. When '-a' option is in effect, zstd compression is selected if the destination archive name ends in '.zst' or '.tzst'.
- The -K option interacts properly with member names given in the command line. Names of members to extract can be specified along with the '-K NAME' option. In this case, tar will extract NAME and those of named members that appear in the archive after it, which is consistent with the semantics of the option. Previous versions of tar extracted NAME, those of named members that appeared before it, and everything after it.
- Fix CVE-2018-20482 - When creating archives with the --sparse option, previous versions of tar would loop endlessly if a sparse file had been truncated while being archived.
- Record
SUSE-SU-2022:1548-1- Updated
- 2026-11-02
OSVUSN-4692-1 No score
tar vulnerabilities
Chris Siebenmann discovered that tar incorrectly handled extracting files resized during extraction when invoked with the --sparse flag. An attacker could possibly use this issue to cause a denial of service. This issue only affected Ubuntu 12.04 ESM, Ubuntu 14.04 ESM, Ubuntu 16.04 LTS and Ubuntu 18.04 LTS. (CVE-2018-20482)
Daniel Axtens discovered that tar incorrectly handled certain malformed tar files. If a user or automated system were tricked into processing a specially crafted tar archive, a remote attacker could use this issue to cause tar to crash, resulting in a denial of service. (CVE-2019-9923)
- Record
USN-4692-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
tarAlpine:v3.10 |
before 1.31-r0 | 1.31-r0 |
tarAlpine:v3.11 |
before 1.31-r0 | 1.31-r0 |
tarAlpine:v3.12 |
before 1.31-r0 | 1.31-r0 |
tarAlpine:v3.13 |
before 1.31-r0 | 1.31-r0 |
tarAlpine:v3.14 |
before 1.31-r0 | 1.31-r0 |
tarAlpine:v3.15 |
before 1.31-r0 | 1.31-r0 |
tarAlpine:v3.16 |
before 1.31-r0 | 1.31-r0 |
tarAlpine:v3.17 |
before 1.31-r0 | 1.31-r0 |
tarAlpine:v3.18 |
before 1.31-r0 | 1.31-r0 |
tarAlpine:v3.19 |
before 1.31-r0 | 1.31-r0 |
Show 35 moreShow less
| Package | Affected | Fixed |
|---|---|---|
tarAlpine:v3.20 |
before 1.31-r0 | 1.31-r0 |
tarAlpine:v3.21 |
before 1.31-r0 | 1.31-r0 |
tarAlpine:v3.22 |
before 1.31-r0 | 1.31-r0 |
tarAlpine:v3.23 |
before 1.31-r0 | 1.31-r0 |
tarAlpine:v3.24 |
before 1.31-r0 | 1.31-r0 |
tarAlpine:v3.6 |
before 1.31-r0 | 1.31-r0 |
tarAlpine:v3.7 |
before 1.31-r0 | 1.31-r0 |
tarAlpine:v3.8 |
before 1.31-r0 | 1.31-r0 |
tarAlpine:v3.9 |
before 1.31-r0 | 1.31-r0 |
tarDebian:12 |
before 1.30+dfsg-3.1 | 1.30+dfsg-3.1 |
tarDebian:13 |
before 1.30+dfsg-3.1 | 1.30+dfsg-3.1 |
tarDebian:14 |
before 1.30+dfsg-3.1 | 1.30+dfsg-3.1 |
tarDebian:8 |
before 1.27.1-2+deb8u2, plus listed versions 1.27.1-21.27.1-2+deb8u1 |
1.27.1-2+deb8u2 |
tarDebian:9 |
before 1.29b-1.1+deb9u1, plus listed versions 1.29b-1.1 |
1.29b-1.1+deb9u1 |
tarMageia:6 |
before 1.31-1.mga6 | 1.31-1.mga6 |
tarSUSE:Linux Enterprise Module for Basesystem 15 From an advisory covering 2 CVEs |
before 1.30-3.3.2 | 1.30-3.3.2 |
tarSUSE:Linux Enterprise Point of Sale 11 SP3 From an advisory covering 2 CVEs |
before 1.27.1-14.8.1 | 1.27.1-14.8.1 |
tarSUSE:Linux Enterprise Server 11 SP4-LTSS From an advisory covering 2 CVEs |
before 1.27.1-14.8.1 | 1.27.1-14.8.1 |
tarSUSE:Linux Enterprise Server 12 SP5 From an advisory covering 2 CVEs |
before 1.27.1-15.6.3 | 1.27.1-15.6.3 |
tarSUSE:Linux Enterprise Server for SAP Applications 12 SP5 From an advisory covering 2 CVEs |
before 1.27.1-15.6.3 | 1.27.1-15.6.3 |
tarSUSE:Linux Enterprise Module for Basesystem 15 SP3 From an advisory covering 3 CVEs |
before 1.34-150000.3.12.1 | 1.34-150000.3.12.1 |
tarSUSE:Linux Enterprise Real Time 15 SP2 From an advisory covering 3 CVEs |
before 1.34-150000.3.12.1 | 1.34-150000.3.12.1 |
tarSUSE:Linux Enterprise Micro 5.0 From an advisory covering 3 CVEs |
before 1.34-150000.3.12.1 | 1.34-150000.3.12.1 |
tarSUSE:Linux Enterprise Micro 5.1 From an advisory covering 3 CVEs |
before 1.34-150000.3.12.1 | 1.34-150000.3.12.1 |
tarSUSE:Linux Enterprise Micro 5.2 From an advisory covering 3 CVEs |
before 1.34-150000.3.12.1 | 1.34-150000.3.12.1 |
taropenSUSE:Leap 15.3 From an advisory covering 3 CVEs |
before 1.34-150000.3.12.1 | 1.34-150000.3.12.1 |
tarUbuntu:Pro:14.04:LTS |
before 1.27.1-1ubuntu0.1+esm1, plus listed versions 1.26+dfsg-81.27-31.27-41.27.1-11.27.1-1ubuntu0.1 |
1.27.1-1ubuntu0.1+esm1 |
tarUbuntu:16.04:LTS |
before 1.28-2.1ubuntu0.2, plus listed versions 1.27.1-21.28-2ubuntu11.28-2.11.28-2.1ubuntu0.1 |
1.28-2.1ubuntu0.2 |
tarUbuntu:18.04:LTS |
before 1.29b-2ubuntu0.2, plus listed versions 1.29b-21.29b-2ubuntu0.1 |
1.29b-2ubuntu0.2 |
tarUbuntu:Pro:14.04:LTS From an advisory covering 2 CVEs |
before 1.27.1-1ubuntu0.1+esm1, plus listed versions 1.26+dfsg-81.27-31.27-41.27.1-11.27.1-1ubuntu0.1 |
1.27.1-1ubuntu0.1+esm1 |
tarUbuntu:16.04:LTS From an advisory covering 2 CVEs |
before 1.28-2.1ubuntu0.2, plus listed versions 1.27.1-21.28-2ubuntu11.28-2.11.28-2.1ubuntu0.1 |
1.28-2.1ubuntu0.2 |
tarUbuntu:18.04:LTS From an advisory covering 2 CVEs |
before 1.29b-2ubuntu0.2, plus listed versions 1.29b-21.29b-2ubuntu0.1 |
1.29b-2ubuntu0.2 |
tarUbuntu:20.04:LTS From an advisory covering 2 CVEs |
before 1.30+dfsg-7ubuntu0.20.04.1, plus listed versions 1.30+dfsg-61.30+dfsg-7 |
1.30+dfsg-7ubuntu0.20.04.1 |
taropenSUSE:Leap 15.0 From an advisory covering 2 CVEs |
before 1.30-lp150.7.1 | 1.30-lp150.7.1 |
taropenSUSE:Tumbleweed From an advisory covering 7 CVEs |
before 1.34-2.2 | 1.34-2.2 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | OSV | |
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2018-20482 is a medium vulnerability (CVSS 4.7) in Gnu Tar, published December 26, 2018. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.53%, the 45th percentile. Fixed in tar 1.31-r0.
References
utcc.utoronto.ca/~cks/space/blog/sysadmin/TarFindingTruncateBug
git.savannah.gnu.org/cgit/tar.git/commit?id=c15c42ccd1e2377945fd0414eca1a49294bff454
lists.debian.org/debian-lts-announce/2018/12/msg00023.html
news.ycombinator.com/item?id=18745431
securityfocus.com/bid/106354
security.gentoo.org/glsa/201903-05
Show 36 moreShow less
lists.gnu.org/archive/html/bug-tar/2018-12/msg00023.html
twitter.com/thatcks/status/1076166645708668928
lists.opensuse.org/opensuse-security-announce/2019-04/msg00077.html
lists.debian.org/debian-lts-announce/2021/11/msg00025.html
cert-portal.siemens.com/productcert/html/ssa-398330.html
nvd.nist.gov/vuln/detail/CVE-2018-20482
github.com/advisories/GHSA-pm5x-48pq-67cq
security.alpinelinux.org/vuln/CVE-2018-20482
docs.bell-sw.com/security/cves/CVE-2018-20482
security-tracker.debian.org/tracker/CVE-2018-20482
advisories.mageia.org/MGASA-2019-0034.html
bugs.mageia.org/show_bug.cgi?id=24117
lists.gnu.org/archive/html/bug-tar/2019-01/msg00000.html
suse.com/support/update/announcement/2019/suse-su-20190926-1
bugzilla.suse.com/1120610
bugzilla.suse.com/1130496
suse.com/security/cve/CVE-2018-20482
suse.com/security/cve/CVE-2019-9923
suse.com/support/update/announcement/2019/suse-su-201914215-1
bugzilla.suse.com/1152736
bugzilla.suse.com/ECO-339
suse.com/support/update/announcement/2020/suse-su-20202806-1
suse.com/support/update/announcement/2022/suse-su-20221548-1
bugzilla.suse.com/1029961
bugzilla.suse.com/1181131
suse.com/security/cve/CVE-2021-20193
ubuntu.com/security/CVE-2018-20482
ubuntu.com/security/notices/USN-4692-1
cve.org/CVERecord?id=CVE-2018-20482
ubuntu.com/security/CVE-2019-9923
lists.opensuse.org/archives/list/[email protected]/thread/4J7MEOLQLFRA3ARNABFNLF2I4CI6U4D6
suse.com/security/cve/CVE-2001-1267
suse.com/security/cve/CVE-2002-0399
suse.com/security/cve/CVE-2005-1918
suse.com/security/cve/CVE-2006-0300
suse.com/security/cve/CVE-2006-6097