Intel

AIKIDO-2025-10020

github.com/cyphar/filepath-securejoin is vulnerable to Path Traversal

Path Traversal Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Jan 14, 2025

72

High Risk

This Affects:

gogithub.com/cyphar/filepath-securejoin
0.1.0 - 0.3.6
Fixed in 0.4.0
Are you affected? Scan for Free

TL;DR

Affected versions of this package are affected by Path Traversal due to an insecure join method that fails to ensure that the root path is safe using filepath.Clean. This vulnerability could allow an attacker to exploit the root path by tricking the function into resolving a path outside the intended directory structure. As a result, this opens the door to directory traversal attacks, enabling the attacker to access or manipulate files in unauthorized locations if the caller does not validate the root path.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

github.com/cyphar/filepath-securejoin is vulnerable to Path Traversal in versions 0.1.0 - 0.3.6.

How to fix this

Upgrade the github.com/cyphar/filepath-securejoin library to the patch version.