CVE-2021-3538

9.8 CRITICAL

📋 TL;DR

This vulnerability in the satori/go.uuid library allows attackers to predict generated UUIDs due to insecure randomness. This affects any application using this library for security-critical UUID generation, potentially enabling session hijacking, privilege escalation, or data manipulation.

💻 Affected Systems

Products:
  • Applications using github.com/satori/go.uuid library
Versions: Versions from commit 0ef6afb2f6cdd6cdaeee3885a95099c63f18fc8c to d91630c8510268e75203009fe7daf2b8e1d60c45
Operating Systems: All operating systems running affected Go applications
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects applications using UUID generation for security-sensitive purposes. Non-security uses may not be exploitable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise through predictable session tokens, authentication bypass, or privilege escalation leading to data theft, ransomware deployment, or system destruction.

🟠

Likely Case

Session hijacking, account takeover, or data integrity compromise in applications using UUIDs for security tokens or unique identifiers.

🟢

If Mitigated

Limited impact if UUIDs are only used for non-security purposes like database keys without security implications.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires the attacker to observe or predict UUID generation patterns. Public proof-of-concept demonstrates the predictability issue.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Versions after commit d91630c8510268e75203009fe7daf2b8e1d60c45

Vendor Advisory: https://github.com/satori/go.uuid/issues/73

Restart Required: Yes

Instructions:

1. Update go.mod to use patched version: go get github.com/satori/go.uuid@latest
2. Rebuild and redeploy application
3. Restart all affected services

🔧 Temporary Workarounds

Switch to alternative UUID library

all

Replace satori/go.uuid with google/uuid which uses cryptographically secure random generation

go get github.com/google/uuid
Replace import statements from "github.com/satori/go.uuid" to "github.com/google/uuid"

🧯 If You Can't Patch

  • Implement additional authentication layers and session validation
  • Monitor for unusual UUID patterns or repeated UUID usage in logs

🔍 How to Verify

Check if Vulnerable:

Check go.mod or vendor directory for satori/go.uuid version. Run: go list -m all | grep satori/go.uuid

Check Version:

go list -m all | grep satori/go.uuid

Verify Fix Applied:

Verify updated version: go list -m all | grep satori/go.uuid and confirm version is after commit d91630c8510268e75203009fe7daf2b8e1d60c45

📡 Detection & Monitoring

Log Indicators:

  • Repeated UUID values in short timeframes
  • Predictable UUID patterns in authentication logs

Network Indicators:

  • Multiple requests with sequential or predictable session tokens

SIEM Query:

source="application_logs" | regex UUID="[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" | stats count by UUID | where count > threshold

🔗 References

📤 Share & Export