CVE-2018-20834
Description
A vulnerability was found in node-tar before version 4.4.2 (excluding version 2.2.2). An Arbitrary File Overwrite issue exists when extracting a tarball containing a hardlink to a file that already exists on the system, in conjunction with a later plain file with the same name as the hardlink. This plain file content replaces the existing file content. A patch has been applied to node-tar v2.2.2).
Severity
HIGH
CVSS v3
7.5
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N · source nvd
Exploit chance (EPSS)
3.145%
chance of exploitation in the next 30 days
higher than 88.1% of scored CVEs · 2026-11-17
CISA KEV
Not listed
Public exploit code
Yes
Exploit references (NVD and CNA): 1
Metasploit modules: 0
Nuclei templates: 0
Weakness
- CWE-59: Improper Link Resolution Before File Access
Timeline
- 2019-04-30Published by the CNA18:01 UTC
- 2019-05-01GitHub advisory published (GHSA-j44m-qm6p-hp7m)1 day after publication
Exploit and advisory records
GitHub advisory GHSA-j44m-qm6p-hp7m, affected packages:
| Package | Vulnerable versions | Fixed in |
|---|---|---|
| npm tar | before 2.2.2 | 2.2.2 |
| npm tar | from 3.0.0 before 4.4.2 | 4.4.2 |
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| isaacs tar | before 2.2.2fixed in 2.2.2from 3.0.0 before 4.4.2fixed in 4.4.2 | 2.2.24.4.2 |
References
- https://github.com/npm/node-tar/commit/b0c58433c22f5e7fe8b1c76373f27e3f81dcd4c8
- https://github.com/npm/node-tar/compare/58a8d43...a5f7779
- https://access.redhat.com/errata/RHSA-2019:1821
- https://hackerone.com/reports/344595
- https://github.com/npm/node-tar/commit/7ecef07da6a9e72cc0c4d0c9c6a8e85b6b52395d
- https://github.com/npm/node-tar/commits/v2.2.2
- https://nvd.nist.gov/vuln/detail/CVE-2018-20834
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2018-20834'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2018-20834'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2018-20834'curl 'https://api.contrastcyber.com/cve_products/CVE-2018-20834'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).