Archive Helpers Need an Extraction Root They Can Prove
Archive Helpers Need an Extraction Root They Can Prove An extraction helper can look like a convenience wrapper. The fastcore CVE-2026-65320 path traversal shows that the wrapper can decide where attacker-supplied file
Archive Helpers Need an Extraction Root They Can Prove
An extraction helper can look like a convenience wrapper. The fastcore CVE-2026-65320 path traversal shows that the wrapper can decide where attacker-supplied files land.
The vulnerability
CVE-2026-65320 affects AnswerDotAI fastcore through version 2.2.44. The public record describes a path traversal in fastcore.xtras.untar_dir(): a crafted tar archive can write files outside the intended extraction directory. Depending on which files an application can overwrite, that may lead to code execution, data modification, or denial of service. The published CVSS 4.0 score is 9.2 and the CVSS 3.1 score is 8.1.
Why tar members are hostile input
A tar archive carries member names, links, and metadata in addition to file content. A name containing parent traversal can escape a destination path if the extractor concatenates strings without resolving the final location. Symlinks and special members create additional cases that a simple filename check may miss. The dangerous boundary is the application that accepts an archive from a user, partner, upload endpoint, or downloaded job.
Find affected use
Search source and dependency locks for untar_dir and for imports from fastcore.xtras. Record the resolved fastcore version and whether the application passes attacker-controlled archives to the helper. Trace the destination directory and the operating-system user that performs extraction. An affected library in an unused notebook image is different from a web service that extracts uploads into an application directory.
Remediation
Upgrade to a fastcore release that contains the project's accepted fix for issue 974 and pull request 973, and verify the patch in the installed package rather than assuming from a version string. If the update cannot be deployed immediately, extract into an isolated directory using a process that validates each member's resolved path and rejects absolute paths, traversal, device nodes, and unexpected links. Run extraction with a low-privilege account and prevent write access to application code and configuration.
Verification
Test with synthetic tar members that attempt parent traversal, absolute paths, and links outside the root. Confirm the expected rejection and check that no file was created outside the sandbox. Review file integrity in application directories after any untrusted archive processing. If an overwrite is suspected, compare against a trusted build and rotate secrets available to the extraction process.
References
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.