CVE-2026-44332: Github.com/gofiber/fiber/v3 GoFiber Vulnerable To Username Enumeration Vulnerability

MODERATE
Advisory Identifier: GHSA-g5vh-55hw-rxm8
CVSS 5.3
CWE-203
Published
Advisory Summary

CVE-2026-44332 is a MODERATE (CVSS 5.3) gofiber vulnerable to username enumeration vulnerability (CWE-203: Observable Discrepancy) affecting Github.com/gofiber/fiber/v3 libraries in the Go ecosystem. The issue involves gofiber vulnerable to username enumeration via timing oracle in basicauth default authorizer. Remediation is available by upgrading affected packages to version 3.3.0.

CVE-2026-44332 at a Glance

CVE Identifier CVE-2026-44332
GHSA Identifier GHSA-g5vh-55hw-rxm8
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-203: Observable Discrepancy
Affected Product Github.com/gofiber/fiber/v3
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-44332

To remediate this vulnerability, upgrade all affected Github.com/gofiber/fiber/v3 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/gofiber/fiber/v3 fixed: 3.3.0
Upgrade github.com/gofiber/fiber/v3 to 3.3.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/gofiber/fiber/v3

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-44332, inspect your project dependencies for Github.com/gofiber/fiber/v3:

inspect dependencies for github.com/gofiber/fiber/v3

Analyze the terminal output to locate any version of Github.com/gofiber/fiber/v3 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.3.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-203: Observable Discrepancy, where the product behaves differently or sends different responses under different circumstances in a way that is observable to an unauthorized actor. In Github.com/gofiber/fiber/v3, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary The default `Authorizer` function in GoFiber's BasicAuth middleware uses short-circuit evaluation that skips password hash comparison for non-existent usernames. With bcrypt-hashed passwords (the primary use case), the timing difference between a valid and invalid username is approximately 1,000,000:1 (~100ms vs ~100ns), enabling reliable remote username enumeration. ## Vulnerable Code **File:** `middleware/basicauth/config.go`, lines 126-138 ```go if cfg.Authorizer == nil { verifiers := make(map[string]func(string) bool, len(cfg.Users)) for u, hpw := range cfg.Users { v, err := parseHashedPassword(hpw) if err != nil { panic(err) } verifiers[u] = v } cfg.Authorizer = func(user, pass string, _ fiber.Ctx) bool { verify, ok := verifiers[user] return ok && verify(pass) // line 137: short-circuit skips verify() if user unknown } } ``` ## Data Flow 1. Attacker sends `Authorization: Basic <base64(candidate:wrongpass)>` 2. BasicAuth middleware decodes credentials and calls `cfg.Authorizer(user, pass, c)` 3. Map lookup `verifiers[user]` returns `ok=false` for non-existent users 4. Go `&&` short-circuit: `false && verify(pass)` returns immediately without calling `verify()` 5. For valid users, `verify(pass)` executes `bcrypt.CompareHashAndPassword()` (line 167: ~100ms at default cost 10) 6. Timing difference: ~100ns (invalid user) vs ~100ms (valid user) = 1,000,000:1 ratio **Timing comparison by hash type:** | Hash Type | Valid User | Invalid User | Ratio | |-----------|-----------|--------------|-------| | bcrypt ($2) | ~100 ms | ~100 ns | 1,000,000:1 | | SHA-512 | ~1-5 us | ~100 ns | 10-50:1 | | SHA-256 | ~1-5 us | ~100 ns | 10-50:1 | ## Impact - **Username enumeration:** Attacker reliably determines which usernames exist by measuring response latency - **Targeted brute force:** After enumerating valid usernames, password brute force is focused only on real accounts - **Account discovery:** In applications where usernames are sensitive (internal tools, admin panels), leaking their existence is itself a security issue ## Notes - Password hash comparisons themselves are timing-safe: `subtle.ConstantTimeCompare` is used correctly for SHA-256 (line 185), SHA-512 (line 176), and bcrypt uses its own constant-time comparison - The fix is to always execute a dummy hash comparison for unknown users: `bcrypt.CompareHashAndPassword(dummyHash, []byte(pass))` and discard the result - This pattern matches CVE-2023-36456 (Authentik timing oracle) and similar findings in other auth libraries

CVE-2026-44332 Affected Github.com/gofiber/fiber/v3 Versions

1 component(s)
Fixed Versions:
3.3.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/gofiber/fiber/v3
Go
< 3.3.0
3.3.0

References

Frequently Asked Questions

What is CVE-2026-44332?
CVE-2026-44332 is a security vulnerability in Github.com/gofiber/fiber/v3 involving GoFiber Vulnerable to Username Enumeration via Timing Oracle in BasicAuth Default Authorizer under CWE-203: Observable Discrepancy.
Which Github.com/gofiber/fiber/v3 versions are affected?
Affected versions include releases prior to 3.3.0 across affected packages: github.com/gofiber/fiber/v3.
What version fixes CVE-2026-44332?
Upgrading to 3.3.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/gofiber/fiber/v3 affected?
Yes, github.com/gofiber/fiber/v3 is affected in releases prior to 3.3.0. Upgrade your dependency to 3.3.0 or later.
What is the CVSS score of CVE-2026-44332?
CVE-2026-44332 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2026-44332?
CVE-2026-44332 is classified under CWE-203: Observable Discrepancy (The product behaves differently or sends different responses under different circumstances in a way that is observable to an unauthorized actor.).
How can I check Go dependencies for CVE-2026-44332?
Run the dependency tree command: 'inspect dependencies for github.com/gofiber/fiber/v3'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-g5vh-55hw-rxm8",
  "modified" : "2026-07-02T13:46:25Z",
  "published" : "2026-07-02T13:46:25Z",
  "aliases" : [ "CVE-2026-44332" ],
  "summary" : "GoFiber Vulnerable to Username Enumeration via Timing Oracle in BasicAuth Default Authorizer",
  "details" : "## Summary\n\nThe default `Authorizer` function in GoFiber's BasicAuth middleware uses short-circuit evaluation that skips password hash comparison for non-existent usernames. With bcrypt-hashed passwords (the primary use case), the timing difference between a valid and invalid username is approximately 1,000,000:1 (~100ms vs ~100ns), enabling reliable remote username enumeration.\n\n## Vulnerable Code\n\n**File:** `middleware/basicauth/config.go`, lines 126-138\n\n```go\nif cfg.Authorizer == nil {\n    verifiers := make(map[string]func(string) bool, len(cfg.Users))\n    for u, hpw := range cfg.Users {\n        v, err := parseHashedPassword(hpw)\n        if err != nil {\n            panic(err)\n        }\n        verifiers[u] = v\n    }\n    cfg.Authorizer = func(user, pass string, _ fiber.Ctx) bool {\n        verify, ok := verifiers[user]\n        return ok && verify(pass)   // line 137: short-circuit skips verify() if user unknown\n    }\n}\n```\n\n## Data Flow\n\n1. Attacker sends `Authorization: Basic <base64(candidate:wrongpass)>`\n2. BasicAuth middleware decodes credentials and calls `cfg.Authorizer(user, pass, c)`\n3. Map lookup `verifiers[user]` returns `ok=false` for non-existent users\n4. Go `&&` short-circuit: `false && verify(pass)` returns immediately without calling `verify()`\n5. For valid users, `verify(pass)` executes `bcrypt.CompareHashAndPassword()` (line 167: ~100ms at default cost 10)\n6. Timing difference: ~100ns (invalid user) vs ~100ms (valid user) = 1,000,000:1 ratio\n\n**Timing comparison by hash type:**\n\n| Hash Type | Valid User | Invalid User | Ratio |\n|-----------|-----------|--------------|-------|\n| bcrypt ($2) | ~100 ms | ~100 ns | 1,000,000:1 |\n| SHA-512 | ~1-5 us | ~100 ns | 10-50:1 |\n| SHA-256 | ~1-5 us | ~100 ns | 10-50:1 |\n\n## Impact\n\n- **Username enumeration:** Attacker reliably determines which usernames exist by measuring response latency\n- **Targeted brute force:** After enumerating valid usernames, password brute force is focused only on real accounts\n- **Account discovery:** In applications where usernames are sensitive (internal tools, admin panels), leaking their existence is itself a security issue\n\n## Notes\n\n- Password hash comparisons themselves are timing-safe: `subtle.ConstantTimeCompare` is used correctly for SHA-256 (line 185), SHA-512 (line 176), and bcrypt uses its own constant-time comparison\n- The fix is to always execute a dummy hash comparison for unknown users: `bcrypt.CompareHashAndPassword(dummyHash, []byte(pass))` and discard the result\n- This pattern matches CVE-2023-36456 (Authentik timing oracle) and similar findings in other auth libraries",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/gofiber/fiber/v3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.3.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.2.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/gofiber/fiber/security/advisories/GHSA-g5vh-55hw-rxm8"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/gofiber/fiber"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-203" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-02T13:46:25Z",
    "nvd_published_at" : null
  }
}