CVE-2020-7665

7.5 HIGH

📋 TL;DR

This vulnerability in the u-root uzip package allows attackers to perform path traversal attacks during zip file extraction, potentially writing files outside the intended directory. All versions of the package are affected. This impacts any application using this Go package for zip extraction.

💻 Affected Systems

Products:
  • github.com/u-root/u-root/pkg/uzip
Versions: All versions prior to fix
Operating Systems: All operating systems running Go applications using this package
Default Config Vulnerable: ⚠️ Yes
Notes: Any application using the uzip package for zip extraction is vulnerable by default.

📦 What is this software?

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Arbitrary file write leading to remote code execution, system compromise, or data destruction by overwriting critical system files.

🟠

Likely Case

Arbitrary file write to sensitive locations, potentially enabling privilege escalation or data exfiltration.

🟢

If Mitigated

Limited impact if extraction occurs in sandboxed environments with restricted file system permissions.

🌐 Internet-Facing: MEDIUM - Requires user to process malicious zip files, but common in file upload scenarios.
🏢 Internal Only: MEDIUM - Internal users could exploit if they can supply zip files to vulnerable systems.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires the ability to provide a malicious zip file to the vulnerable extraction function.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Fixed in commit 7b5f7b9 and later versions

Vendor Advisory: https://github.com/u-root/u-root/pull/1817

Restart Required: No

Instructions:

1. Update Go dependencies: go get -u github.com/u-root/u-root/pkg/uzip
2. Rebuild and redeploy affected applications
3. Verify the fix by checking for the security patch in your version

🔧 Temporary Workarounds

Input validation and sanitization

all

Implement custom validation to reject zip files with path traversal attempts before extraction

Sandboxed extraction

linux

Extract zip files in isolated containers or chroot environments with restricted permissions

🧯 If You Can't Patch

  • Implement strict file permission controls on extraction directories
  • Monitor file system writes for suspicious patterns and implement file integrity monitoring

🔍 How to Verify

Check if Vulnerable:

Check if your Go application imports github.com/u-root/u-root/pkg/uzip and review version

Check Version:

go list -m github.com/u-root/u-root

Verify Fix Applied:

Verify your application uses a version after the fix commit 7b5f7b9

📡 Detection & Monitoring

Log Indicators:

  • Unusual file write patterns outside expected directories
  • Failed file write attempts to protected system paths

Network Indicators:

  • Large or suspicious zip file uploads to affected services

SIEM Query:

source="application_logs" AND ("uzip" OR "zip extraction") AND ("permission denied" OR "access denied")

🔗 References

📤 Share & Export