Skip to main content

GoFiber BasicAuth EUVDEUVD-2026-42358

| CVE-2026-44332 MEDIUM
Observable Discrepancy (CWE-203)
2026-07-02 https://github.com/gofiber/fiber GHSA-g5vh-55hw-rxm8
5.3
CVSS 3.1 · Vendor: https://github.com/gofiber/fiber
Share

Severity by source

Vendor (https://github.com/gofiber/fiber) PRIMARY
5.3 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
vuln.today AI
5.3 MEDIUM

Network timing oracle requiring no privileges; the 1,000,000:1 ratio justifies AC:L; impact is username enumeration only, so C:L and I/A:N.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/gofiber/fiber).

CVSS VectorVendor: https://github.com/gofiber/fiber

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

Lifecycle Timeline

1
Analysis Generated
Jul 02, 2026 - 15:01 vuln.today

DescriptionCVE.org

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 TypeValid UserInvalid UserRatio
bcrypt ($2)~100 ms~100 ns1,000,000:1
SHA-512~1-5 us~100 ns10-50:1
SHA-256~1-5 us~100 ns10-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

AnalysisAI

Remote username enumeration in GoFiber fiber v3's default BasicAuth middleware exploits a timing side-channel caused by Go's short-circuit && evaluation, producing a ~1,000,000:1 response-time ratio between valid and invalid usernames when bcrypt hashing is in use. Any GoFiber v3 application relying on the default Authorizer with hashed credentials is affected; an unauthenticated remote attacker can enumerate valid usernames by measuring HTTP response latency, then focus credential brute-force exclusively on confirmed accounts. …

Unlock full vulnerability intelligence

  • Risk assessment & exploitation conditions
  • Attack chain visualization
  • Remediation with exact patch versions
  • Threat intelligence from 22 sources
  • Personal watchlist & email alerts

Free forever · No credit card required

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata

Recon
Send HTTP request with candidate username
Delivery
BasicAuth middleware decodes credentials
Exploit
Map lookup returns ok=false for unknown user
Install
Short-circuit skips bcrypt comparison
C2
Measure response latency (~100ns vs ~100ms)
Execute
Enumerate confirmed valid usernames
Impact
Launch focused password brute-force against real accounts

Vulnerability AssessmentAI

Exploitation Exploitation requires the target application to use GoFiber fiber v3's BasicAuth middleware with its default `Authorizer` - i.e., the application must not have configured a custom `Authorizer` that performs constant-time comparison for unknown users. … Additional conditions and limiting factors are described in the full assessment.
Risk Assessment The NVD CVSS 3.1 score of 5.3 (AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N) reflects a limited-confidentiality-loss finding, which is accurate in isolation. … Full risk analysis with EPSS, KEV, and SSVC signal comparison available after sign-in.
Exploit Scenario An unauthenticated attacker iterates a username wordlist, sending HTTP requests with `Authorization: Basic <base64(candidate:wrongpass)>` for each candidate. Responses completing in under 1ms indicate an unknown username (~100ns path); responses taking ~100ms indicate a valid username (bcrypt comparison executed). …
Remediation No vendor-released patched version has been independently confirmed at time of analysis; monitor the advisory at https://github.com/gofiber/fiber/security/advisories/GHSA-g5vh-55hw-rxm8 and the upstream repository at https://github.com/gofiber/fiber for a patched fiber v3 release. … Detailed patch versions, workarounds, and compensating controls in full report.

Threat intelligence, references, and detailed analysis are available after sign-in.

Share

EUVD-2026-42358 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy