Release Date: November 19, 2025
v0.4.2 is a critical security release that patches a serious directory traversal vulnerability discovered in the file storage system. This vulnerability allowed authenticated users to access files outside the intended storage directory, including sensitive configuration files and system files.
Severity: HIGH - Authenticated users could access arbitrary files on the server
Description:
The storage system was vulnerable to path traversal attacks where authenticated users could use relative path sequences (../, ../../) to escape the configured storage directory and access sensitive files anywhere on the server filesystem.
Attack Vector:
# Example attack that would succeed in v0.4.1 and earlier:
goflux get ../../tokens.json /tmp/stolen_tokens.json
goflux get ../../../etc/passwd /tmp/passwdImpact:
- Unauthorized access to authentication tokens (
tokens.json) - Exposure of server configuration files
- Potential access to system files and other sensitive data
- Complete compromise of server confidentiality for authenticated users
Path Sanitization Implementation
- Added comprehensive path validation in
pkg/storage/storage.go - New
sanitizePath()method prevents directory traversal - All storage operations now validate paths before filesystem access
Technical Details:
Path Validation Process:
- Path Cleaning - Resolves
.and..components usingfilepath.Clean() - Relative Path Enforcement - Strips leading slashes to ensure relative paths
- Boundary Validation - Compares absolute paths to ensure result stays within storage root
- Traversal Detection - Returns explicit error for path traversal attempts
Updated Storage Methods:
Put()- Now validates paths before writing filesGet()- Now validates paths before reading filesExists()- Now validates paths before checking existenceList()- Now validates paths before listing directories
Error Handling:
- Path traversal attempts return:
"invalid path: path traversal attempt detected: <path>" - Malformed paths are rejected with descriptive error messages
- Failed validation prevents any filesystem access
Attack Mitigation Verified:
# These attacks now fail with proper error messages:
goflux get ../../tokens.json → ERROR: invalid path: path traversal attempt detected
goflux get ../config.json → ERROR: invalid path: path traversal attempt detected
goflux get /etc/passwd → ERROR: invalid path: path traversal attempt detectedLegitimate Operations Unchanged:
# Normal file operations continue to work:
goflux get file.txt → ✅ Success
goflux get folder/file.txt → ✅ Success
goflux ls subfolder → ✅ SuccessNone - This is a security patch that maintains full backward compatibility for legitimate use cases.
IMMEDIATE UPGRADE RECOMMENDED
-
Stop your goflux server:
# Kill the running server process -
Build and deploy v0.4.2:
go build -o bin/goflux-server.exe ./cmd/goflux-server go build -o bin/goflux.exe ./cmd/goflux
-
Restart server with new binary:
./goflux-server -config goflux.json
-
Verify security fix:
# This should now fail with an error: ./goflux get ../../tokens.json test.json
CVE Status: Pending assignment
CVSS Score: 8.1 (HIGH) - AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Affected Versions: All versions prior to v0.4.2
Fixed Version: v0.4.2+
Recommendation: Immediate upgrade required for all deployments
Thanks to the security research community for responsible disclosure practices. If you discover security vulnerabilities, please report them responsibly to the project maintainers.
Go Version: 1.21+
Platforms: Windows, Linux, macOS
Dependencies: No new dependencies added
For technical support or security questions, please contact the development team.