CVE-2021-36377
📋 TL;DR
This vulnerability in Fossil SCM software allows attackers to perform man-in-the-middle attacks by bypassing TLS certificate hostname validation. When Fossil connects to remote repositories over HTTPS, it may accept certificates that don't match the expected hostname, enabling interception of sensitive data. All users of affected Fossil versions are at risk when cloning or syncing with remote repositories.
💻 Affected Systems
- Fossil SCM
📦 What is this software?
Fedora by Fedoraproject
Fossil by Fossil Scm
Fossil by Fossil Scm
⚠️ Risk & Real-World Impact
Worst Case
Attackers intercept and modify source code, commit history, or sensitive credentials during repository operations, potentially injecting malicious code or stealing intellectual property.
Likely Case
Man-in-the-middle attackers intercept repository traffic in untrusted networks, potentially accessing sensitive source code or commit metadata.
If Mitigated
With proper network controls and certificate pinning, impact is limited to denial of service if certificate validation fails.
🎯 Exploit Status
Exploitation requires man-in-the-middle position on network path between client and repository server.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 2.14.2 or 2.15.2
Vendor Advisory: https://fossil-scm.org/forum/forumpost/8d367e16f53d93c789d70bd3bf2c9587227bbd5c6a7b8e512cccd79007536036
Restart Required: No
Instructions:
1. Download latest Fossil version from fossil-scm.org
2. Replace existing fossil binary with new version
3. No restart needed - takes effect immediately
🔧 Temporary Workarounds
Use SSH instead of HTTPS
allConfigure Fossil to use SSH protocol for repository operations instead of HTTPS
fossil clone ssh://user@host/path/to/repo.fossil
fossil remote-url set ssh://user@host/path/to/repo.fossil
Use local repositories only
allAvoid syncing with remote repositories until patched
🧯 If You Can't Patch
- Use VPN or trusted network for all repository operations
- Implement certificate pinning at network level using proxy or firewall
🔍 How to Verify
Check if Vulnerable:
Run 'fossil version' and check if version is before 2.14.2 or between 2.15.0-2.15.1
Check Version:
fossil version
Verify Fix Applied:
Confirm version is 2.14.2 or higher, or 2.15.2 or higher
📡 Detection & Monitoring
Log Indicators:
- Failed TLS certificate validation warnings
- Unexpected repository connection sources
Network Indicators:
- HTTPS traffic to Fossil repositories from unexpected locations
- Certificate validation failures in network logs
SIEM Query:
source="fossil" AND (event="certificate_validation_failed" OR event="tls_error")
🔗 References
- https://fossil-scm.org/forum/forumpost/8d367e16f53d93c789d70bd3bf2c9587227bbd5c6a7b8e512cccd79007536036
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/JBTRZ5HCOUTIIKJF3T37NORI4P7EVYCY/
- https://fossil-scm.org/forum/forumpost/8d367e16f53d93c789d70bd3bf2c9587227bbd5c6a7b8e512cccd79007536036
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/JBTRZ5HCOUTIIKJF3T37NORI4P7EVYCY/