☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 9.2 🐛 CWE-338
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2025-66630

CVE-2025-66630 Cross-Site Request Forgery in Fiber
📅 PUBLISHED: 2026-02-09 18:04 UTC 🔄 UPDATED: 2026-10-09 05:42 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.53%
👁️
0.53% probability
13.4× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
9.2
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-66630 is a vulnerability in the Fiber web framework for Go, affecting versions prior to 2.52.11 when running on Go versions before 1.24. The core issue lies in the utils.UUIDv4() function, which silently ignores errors from the underlying crypto/rand package. On older Go runtimes, crypto/rand can return an error if secure randomness is unavailable, causing the UUID generation to fall back to a predictable or low-entropy state. This flaw is particularly dangerous because many Fiber middleware components—such as session management, CSRF protection, rate limiting, and request-ID generation—default to using utils.UUIDv4(). An attacker could exploit this to predict session tokens, bypass CSRF protections, or manipulate rate-limiting identifiers, leading to session hijacking, privilege escalation, or denial of service.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects the Go ecosystem, specifically the Fiber web framework package (github.com/gofiber/fiber/v2). Since Fiber is a widely used dependency in Go web applications, any project relying on Fiber v2 before 2.52.11 and compiled with Go < 1.24 is at risk. The flaw is in the framework’s core utility functions, meaning it propagates to all dependent middleware and applications. Developers must update their go.mod to require github.com/gofiber/fiber/v2 v2.52.11 or later and rebuild their binaries with Go 1.24+ to fully mitigate the issue.

CVSS Breakdown & Threat Level

  • CVSS Score: 5.4 (Medium)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
  • Attack Vector: Network
  • Attack Complexity: Low
  • Privileges Required: None
  • User Interaction: None
  • Scope: Unchanged
  • Confidentiality Impact: Low (predictable identifiers may leak session patterns)
  • Integrity Impact: Low (predictable tokens can be forged)
  • Availability Impact: None

Threat Level: Medium. While the vulnerability does not allow direct remote code execution, it undermines the security of multiple authentication and authorization mechanisms, making it a valuable target for attackers seeking to hijack sessions or bypass CSRF protections.

Deep Dive & Mechanics

The vulnerability stems from the interaction between Fiber’s utils.UUIDv4() function and Go’s crypto/rand package. In Go versions prior to 1.24, crypto/rand.Read() can return an error if the system’s entropy source is exhausted or unavailable (e.g., in containerized environments with limited entropy). The Fiber code, as shown below, does not check this error:

// Vulnerable code in utils/uuid.go (Fiber < 2.52.11)
func UUIDv4() string {
    b := make([]byte, 16)
    rand.Read(b) // Error ignored
    // Set version 4 bits
    b[6] = (b[6] & 0x0f) | 0x40
    b[8] = (b[8] & 0x3f) | 0x80
    return fmt.Sprintf("%x-%x-%x-%x-%x", b[0:4], b[4:6], b[6:8], b[8:10], b[10:])
}

When rand.Read() fails, the byte slice b retains its zero-value state (all zeros), resulting in a predictable UUID like 00000000-0000-4000-8000-000000000000. This UUID is then used by middleware such as:

  • Session middleware: Generates session IDs via utils.UUIDv4().
  • CSRF middleware: Creates CSRF tokens.
  • Rate limiter: Uses UUIDs for request tracking.
  • Request-ID middleware: Assigns unique IDs to requests.

An attacker can exploit this by:

  1. Predicting session IDs: If the server’s entropy is low, all session IDs become identical or follow a predictable pattern, allowing session hijacking.
  2. Bypassing CSRF protection: Predictable CSRF tokens can be forged in cross-site requests.
  3. Manipulating rate limits: Identical request IDs can be reused to bypass rate-limiting counters.

The fix in Fiber v2.52.11 adds error handling:

// Patched code in utils/uuid.go (Fiber >= 2.52.11)
func UUIDv4() (string, error) {
    b := make([]byte, 16)
    _, err := rand.Read(b)
    if err != nil {
        return "", err
    }
    b[6] = (b[6] & 0x0f) | 0x40
    b[8] = (b[8] & 0x3f) | 0x80
    return fmt.Sprintf("%x-%x-%x-%x-%x", b[0:4], b[4:6], b[6:8], b[8:10], b[10:]), nil
}

Additionally, upgrading to Go 1.24+ ensures that crypto/rand never returns an error under normal conditions, providing a secondary layer of defense.

Vulnerable vs. Patched Code

Vulnerable (Fiber < 2.52.11):

// utils/uuid.go
func UUIDv4() string {
    b := make([]byte, 16)
    rand.Read(b) // Error ignored
    b[6] = (b[6] & 0x0f) | 0x40
    b[8] = (b[8] & 0x3f) | 0x80
    return fmt.Sprintf("%x-%x-%x-%x-%x", b[0:4], b[4:6], b[6:8], b[8:10], b[10:])
}

Patched (Fiber >= 2.52.11):

// utils/uuid.go
func UUIDv4() (string, error) {
    b := make([]byte, 16)
    _, err := rand.Read(b)
    if err != nil {
        return "", err
    }
    b[6] = (b[6] & 0x0f) | 0x40
    b[8] = (b[8] & 0x3f) | 0x80
    return fmt.Sprintf("%x-%x-%x-%x-%x", b[0:4], b[4:6], b[6:8], b[8:10], b[10:]), nil
}

The key difference is the return of an error when rand.Read() fails, preventing silent fallback to predictable UUIDs.

Exploitation & Lab Setup

Red Team

Lab Setup:

  1. Create a Go 1.23 environment (or any version < 1.24).
  2. Initialize a Fiber v2.52.10 project:
    go mod init exploit-lab
    go get github.com/gofiber/fiber/v2@v2.52.10
    
  3. Create a simple server with session middleware:
    package main
    import (
        "github.com/gofiber/fiber/v2"
        "github.com/gofiber/fiber/v2/middleware/session"
    )
    func main() {
        app := fiber.New()
        store := session.New()
        app.Get("/login", func(c *fiber.Ctx) error {
            sess, _ := store.Get(c)
            sess.Set("user", "admin")
            sess.Save()
            return c.SendString("Session created")
        })
        app.Listen(":3000")
    }
    
  4. Simulate low entropy (e.g., in a Docker container with --privileged=false and limited /dev/random).
  5. Observe that all session IDs are identical (e.g., 00000000-0000-4000-8000-000000000000).

Exploitation:

  • Use a script to repeatedly request /login and capture the Set-Cookie header.
  • If all session IDs are identical, an attacker can reuse the same session cookie to impersonate any user.
  • For CSRF bypass, predict the token by observing the pattern (e.g., all zeros).

Blue Team

Detection:

  • Monitor for repeated UUID values in logs, especially session IDs or CSRF tokens.
  • Check for errors from crypto/rand in application logs (if logging is enabled).
  • Use the YARA rule below to scan binaries for the vulnerable pattern.

Mitigation:

  • Immediately upgrade to Fiber v2.52.11 and Go 1.24+.
  • If immediate upgrade is not possible, implement a wrapper that checks for errors from utils.UUIDv4() and retries or logs failures.
  • Add runtime entropy monitoring (e.g., check /proc/sys/kernel/random/entropy_avail on Linux).

Indicators of Compromise (IOCs)

  • Predictable UUIDs: Session IDs or CSRF tokens matching 00000000-0000-4000-8000-000000000000 or other low-entropy patterns.
  • Repeated session IDs: Multiple users receiving the same session cookie value.
  • Error logs: Entries indicating crypto/rand: failed to read random bytes (if error logging is enabled).
  • Binary signature: Go binaries compiled with Fiber < 2.52.11 and Go < 1.24.

Detection Engineering

YARA Rule

rule CVE_2025_66630_Fiber_UUID {
    meta:
        description = "Detects vulnerable Fiber UUIDv4 function that ignores crypto/rand errors"
        author = "Valters IT"
        date = "2025-04-10"
        cve = "CVE-2025-66630"
    strings:
        $uuid_func = "UUIDv4" ascii wide
        $rand_read = "rand.Read" ascii wide
        $no_error_check = { 48 00 00 00 00 00 00 00 } // Pattern for zeroed byte slice after failed read
    condition:
        $uuid_func and $rand_read and $no_error_check
}

Sigma Rule

title: CVE-2025-66630 - Predictable UUID Generation in Fiber
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects repeated or zeroed UUIDs in application logs, indicating exploitation of CVE-2025-66630
author: Valters IT
date: 2025-04-10
logsource:
    category: application
    product: go_fiber
detection:
    selection:
        - "session_id: 00000000-0000-4000-8000-000000000000"
        - "csrf_token: 00000000-0000-4000-8000-000000000000"
        - "request_id: 00000000-0000-4000-8000-000000000000"
    condition: selection
falsepositives:
    - Legitimate use of zeroed UUIDs in testing environments
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-66630 - Predictable UUID in Fiber Session Cookie"; flow:to_server; content:"Set-Cookie"; nocase; content:"00000000-0000-4000-8000-000000000000"; distance:0; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate Upgrade: Update Fiber to v2.52.11 or later:
    go get github.com/gofiber/fiber/v2@v2.52.11
    
  2. Upgrade Go Runtime: Use Go 1.24 or later to ensure crypto/rand never returns an error under normal conditions.
  3. Code Review: Audit all uses of utils.UUIDv4() in your codebase and ensure error handling is in place.
  4. Entropy Monitoring: Implement monitoring for system entropy levels (e.g., entropy_avail on Linux) and alert if it drops below 1000.
  5. Fallback Mechanism: If upgrade is delayed, wrap UUID generation with a retry loop:
    func safeUUID() string {
        for i := 0; i < 3; i++ {
            id, err := utils.UUIDv4()
            if err == nil {
                return id
            }
            time.Sleep(100 * time.Millisecond)
        }
        // Fallback to a secure random source
        b := make([]byte, 16)
        if _, err := rand.Read(b); err == nil {
            return fmt.Sprintf("%x-%x-%x-%x-%x", b[0:4], b[4:6], b[6:8], b[8:10], b[10:])
        }
        return ""
    }
    

Valters IT
Securing the digital frontier, one CVE at a time.

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-66630/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.