CVE-2025-66565
vulnerability analysis and mitigation

Overview

CVE-2025-66565 is a critical cryptographic fallback vulnerability in the github.com/gofiber/utils Go package, affecting the UUIDv4() and UUID() functions. When the system's cryptographic random number generator (crypto/rand) fails, both functions silently return predictable UUID values — including the zero UUID "00000000-0000-0000-0000-000000000000" — with no error propagated to the caller. Affected versions include github.com/gofiber/utils ≤ 1.1.0 and github.com/gofiber/utils/v2 < 2.0.0-rc.4 (on Go < 1.24). The vulnerability was published on December 7, 2025, and has a CVSS v3.1 base score of 9.8 (Critical) and a CVSS v4.0 score of 9.2 (Critical) (Github Advisory).

Technical details

The root cause is an unchecked return value (CWE-252) combined with insufficient entropy (CWE-331) and use of a cryptographically weak PRNG fallback (CWE-338). Two distinct failure paths exist: (1) UUIDv4() calls google/uuid.NewRandom() which uses crypto/rand.Read() internally; on failure, it silently falls back to the internal UUID() function without returning an error; (2) UUID() directly calls crypto/rand.Read(uuidSeed[:]) to seed its state, and on failure silently returns the zero UUID without any notification to the caller. This behavior is only present on Go < 1.24; Go 1.24+ panics on crypto/rand.Read() failures, preventing the silent fallback. Realistic trigger conditions include restricted /dev/random or /dev/urandom access, broken container environments, sandbox restrictions, misconfigured VMs, or FIPS-mode RNG failures (Github Advisory, gofiber/utils Advisory).

Impact

Successful exploitation causes all UUID-based security identifiers generated by the affected Fiber application to collapse to the single predictable zero UUID, completely undermining the application's security model. Because many Fiber middleware packages (session, CSRF, auth, rate-limit, request-ID) default to utils.UUIDv4(), the consequences include session fixation and universal session hijacking, CSRF token predictability and bypass, authentication token replay attacks, and global identifier collisions. Additionally, every request sharing the same "unique" key can cause cache overwrites, session stomping, corrupted internal maps, loss of user isolation, and a potential application-wide denial of service (Github Advisory).

Exploitability

A proof-of-concept is referenced in the GitHub Advisory, though no evidence of active in-the-wild exploitation has been reported as of the advisory date (Github Advisory). The EPSS score is approximately 0.08% (24th percentile), indicating a low but non-negligible probability of exploitation in the near term. The vulnerability is not currently listed in the CISA KEV catalog. Exploitation requires triggering a crypto/rand failure condition (e.g., via a restricted or broken RNG environment), which is classified as medium exploitability by the advisory authors. No threat actor attribution has been reported.

Exploitation steps

  1. Identify target: Locate a Fiber-based Go web application running on Go < 1.24 that uses github.com/gofiber/utils ≤ 1.1.0 or v2 < 2.0.0-rc.4, particularly one using session, CSRF, or authentication middleware that defaults to utils.UUIDv4().
  2. Trigger RNG failure: Cause the target system's crypto/rand to fail — for example, by exploiting a misconfigured container environment that restricts access to /dev/urandom, a FIPS-mode RNG failure, or a sandbox restriction that blocks random device access.
  3. Observe predictable UUID generation: Once crypto/rand.Read() fails, UUIDv4() silently falls back to UUID(), which returns the zero UUID "00000000-0000-0000-0000-000000000000" for all subsequent calls with no error surfaced to the application.
  4. Exploit predictable session/CSRF tokens: With all session IDs or CSRF tokens now equal to the zero UUID, craft requests using 00000000-0000-0000-0000-000000000000 as the session cookie or CSRF token to hijack any active session, bypass CSRF protections, or replay authentication tokens.
  5. Achieve objective: Gain unauthorized access to any user's session, perform privileged actions by bypassing CSRF checks, or cause application-wide DoS through identifier collisions and session stomping (Github Advisory, gofiber/utils Advisory).

Indicators of compromise

  • Logs: Application logs showing repeated session IDs, CSRF tokens, or request IDs all equal to 00000000-0000-0000-0000-000000000000; Go runtime errors or panics related to crypto/rand failures in application stderr.
  • Network: Multiple distinct HTTP requests from different clients presenting the same session cookie value (00000000-0000-0000-0000-000000000000); successful authentication or CSRF-protected requests using the zero UUID token.
  • Application Behavior: Unexpected session collisions where multiple users share the same session state; CSRF validation passing for requests with the zero UUID token; cache corruption or data mixing between user sessions.
  • File System / Environment: Evidence of restricted access to /dev/random or /dev/urandom in container or VM configurations (e.g., seccomp profiles blocking getrandom syscall, missing /dev/urandom device in container).

Mitigation and workarounds

Patched versions: Upgrade to github.com/gofiber/utils v1.2.0 or github.com/gofiber/utils/v2 v2.0.0-rc.4 or later. The fix (commit 6c6cf04) replaces silent fallbacks with explicit panic() calls so failures are immediately visible rather than silently degrading security (Patch Commit). Immediate workaround: Replace all calls to utils.UUIDv4() with uuid.New() from the github.com/google/uuid package directly, which does not have the silent fallback behavior. Additional mitigations: Upgrade the Go runtime to version 1.24 or later, which panics on crypto/rand.Read() failures and prevents the silent zero UUID return; audit all Fiber middleware configurations to identify security-critical UUID usage; ensure container and VM environments have proper access to system entropy sources (Github Advisory).

Community reactions

The vulnerability was reported by researcher @sixcolors and published by ReneWerner87 (a gofiber maintainer) on December 7, 2025. The advisory was reviewed and published to the GitHub Advisory Database on December 8, 2025, and subsequently picked up by the National Vulnerability Database on December 9, 2025. Red Hat also tracked the vulnerability (published December 10, 2025), and SUSE issued a govulncheck advisory referencing it in early 2026. No significant broader media coverage or notable community controversy has been identified beyond standard advisory distribution channels (Github Advisory).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management