unearth through 0.18.2, fixed in commit 6c78164, contains a path traversal vulnerability in the is_within_directory function that fails to normalize paths before validation, allowing ../ sequences to bypass directory containment checks. Attackers can supply malicious tar archives with symlink members or traversal sequences to write files to arbitrary filesystem locations accessible to the process.
https://github.com/frostming/unearth/pull/181
https://github.com/frostming/unearth/issues/180
https://github.com/frostming/unearth/commit/6c78164e7bfa28b8b3d6f247b87e560692e3c8ba
Published: 2026-08-10
Updated: 2026-08-11
Base Score: 9.4
Vector: CVSS2#AV:N/AC:L/Au:N/C:N/I:C/A:C
Severity: High
Base Score: 8.1
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
Severity: High
Base Score: 7.2
Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N
Severity: High
EPSS: 0.00375