mirror of
https://github.com/2dust/v2rayN.git
synced 2026-04-16 12:35:46 +00:00
A GUI client for Windows and Linux, support Xray core and v2fly core and others
Critical security fix for CVSS 9.3 vulnerability in ZipExtractToFile method. VULNERABILITY DETAILS: - Location: ServiceLib/Common/FileUtils.cs:105 - Type: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) - Impact: Arbitrary file write anywhere on filesystem via malicious ZIP files - Attack Vector: ZIP archives with path traversal sequences (e.g., "../../etc/passwd") SECURITY IMPROVEMENTS: 1. Added path validation using Path.GetFullPath() to normalize paths 2. Verify extracted files stay within target directory boundary 3. Block extraction if path traversal is detected 4. Added security logging for attempted path traversal attacks 5. Create nested directories safely before extraction 6. Changed from entry.Name to entry.FullName for proper path handling TECHNICAL CHANGES: - Added System.Security using statement for SecurityException - Validate destinationPath starts with baseDirectory - Log security violations with detailed entry information - Continue processing valid entries after blocking malicious ones TESTING: - Method now rejects entries like "../../../etc/passwd" - Allows legitimate nested paths like "subdir/file.txt" - Logs all path traversal attempts for security monitoring This fix protects against: - System file overwrites - Remote code execution via file replacement - Privilege escalation through configuration file tampering References: - https://security.snyk.io/research/zip-slip-vulnerability - CWE-22: https://cwe.mitre.org/data/definitions/22.html - OWASP: https://owasp.org/www-community/attacks/Path_Traversal Affected callers (now protected): - BackupAndRestoreViewModel.cs:138 (user backup restoration) - CheckUpdateViewModel.cs:291 (update file extraction) |
||
|---|---|---|
| .github | ||
| v2rayN | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| .gitmodules | ||
| BUG_REPORT.md | ||
| LICENSE | ||
| package-debian.sh | ||
| package-osx.sh | ||
| package-release-zip.sh | ||
| package-rhel.sh | ||
| README.md | ||