Skip to content

fix(deps): update module github.com/gofiber/fiber/v2 to v2.52.11 [security]#2207

Merged
mromaszewicz merged 1 commit intomainfrom
renovate/examples/go-github.com-gofiber-fiber-v2-vulnerability
Feb 9, 2026
Merged

fix(deps): update module github.com/gofiber/fiber/v2 to v2.52.11 [security]#2207
mromaszewicz merged 1 commit intomainfrom
renovate/examples/go-github.com-gofiber-fiber-v2-vulnerability

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate bot commented Feb 9, 2026

This PR contains the following updates:

Package Change Age Confidence
github.com/gofiber/fiber/v2 v2.52.4v2.52.11 age confidence

GitHub Vulnerability Alerts

CVE-2024-38513

A security vulnerability has been identified in the Fiber session middleware where a user can supply their own session_id value, leading to the creation of a session with that key.

Impact

The identified vulnerability is a session middleware issue in GoFiber versions 2 and above. This vulnerability allows users to supply their own session_id value, resulting in the creation of a session with that key. If a website relies on the mere presence of a session for security purposes, this can lead to significant security risks, including unauthorized access and session fixation attacks. All users utilizing GoFiber's session middleware in the affected versions are impacted.

Patches

The issue has been addressed in the latest patch. Users are strongly encouraged to upgrade to version 2.52.5 or higher to mitigate this vulnerability.

Workarounds

Users who are unable to upgrade immediately can apply the following workarounds to reduce the risk:

  1. Validate Session IDs: Implement additional validation to ensure session IDs are not supplied by the user and are securely generated by the server.
  2. Session Management: Regularly rotate session IDs and enforce strict session expiration policies.

References

For more information on session best practices:

Users are encouraged to review these references and take immediate action to secure their applications.

CVE-2025-54801

Description

When using Fiber's Ctx.BodyParser to parse form data containing a large numeric key that represents a slice index (e.g., test.18446744073704), the application crashes due to an out-of-bounds slice allocation in the underlying schema decoder.

The root cause is that the decoder attempts to allocate a slice of length idx + 1 without validating whether the index is within a safe or reasonable range. If idx is excessively large, this leads to an integer overflow or memory exhaustion, causing a panic or crash.

Steps to Reproduce

Create a POST request handler that accepts x-www-form-urlencoded data

package main

import (
	"fmt"
	"net/http"

	"github.com/gofiber/fiber/v2"
)

type RequestBody struct {
	NestedContent []*struct{} `form:"test"`
}

func main() {
	app := fiber.New()

	app.Post("/", func(c *fiber.Ctx) error {
		formData := RequestBody{}
		if err := c.BodyParser(&formData); err != nil {
			fmt.Println(err)
			return c.SendStatus(http.StatusUnprocessableEntity)
		}
		return nil
	})

	fmt.Println(app.Listen(":3000"))
}

Run the server and send a POST request with a large numeric key in form data, such as:

curl -v -X POST localhost:3000 --data-raw 'test.18446744073704' \
  -H 'Content-Type: application/x-www-form-urlencoded'

Relevant Code Snippet

Within the decoder's decode method:

idx := parts[0].index
if v.IsNil() || v.Len() < idx+1 {
    value := reflect.MakeSlice(t, idx+1, idx+1)  // <-- Panic/crash occurs here when idx is huge
    if v.Len() < idx+1 {
        reflect.Copy(value, v)
    }
    v.Set(value)
}

The idx is not validated before use, leading to unsafe slice allocation for extremely large values.


Impact

  • Application panic or crash on malicious or malformed input.
  • Potential denial of service (DoS) via memory exhaustion or server crash.
  • Lack of defensive checks in the parsing code causes instability.

CVE-2025-66630

Fiber v2 contains an internal vendored copy of gofiber/utils, and its functions UUIDv4() and UUID() inherit the same critical weakness described in the upstream advisory. On Go versions prior to 1.24, the underlying crypto/rand implementation can return an error if secure randomness cannot be obtained. In such cases, these Fiber v2 UUID functions silently fall back to generating predictable values — the all-zero UUID 00000000-0000-0000-0000-000000000000.

On Go 1.24+, the language guarantees that crypto/rand no longer returns an error (it will block or panic instead), so this vulnerability primarily affects Fiber v2 users running Go 1.23 or earlier, which Fiber v2 officially supports.

Because no error is returned by the Fiber v2 UUID functions, application code may unknowingly rely on predictable, repeated, or low-entropy identifiers in security-critical pathways. This is especially impactful because many Fiber v2 middleware components (session middleware, CSRF, rate limiting, request-ID generation, etc.) default to using utils.UUIDv4().

Impact includes, but is not limited to:

  • Session fixation or hijacking (predictable session IDs)
  • CSRF token forgery or bypass
  • Authentication replay / token prediction
  • Potential denial-of-service (DoS): if the zero UUID is generated, key-based structures (sessions, rate-limits, caches, CSRF stores) may collapse into a single shared key, causing overwrites, lock contention, or state corruption
  • Request-ID collisions, undermining logging and trace integrity
  • General compromise of confidentiality, integrity, and authorization logic relying on UUIDs for uniqueness or secrecy

All Fiber v2 versions containing the internal utils.UUIDv4() / utils.UUID() implementation are affected when running on Go <1.24. No patched Fiber v2 release currently exists.


Suggested Mitigations / Workarounds

Update to the latest version of Fiber v2.


Likelihood / Environmental Factors

It’s important to note that entropy exhaustion on modern Linux systems is extremely rare, as the kernel’s CSPRNG is resilient and non-blocking. However, entropy-source failures — where crypto/rand cannot read from its underlying provider — are significantly more likely in certain environments.

This includes containerized deployments, restricted sandboxes, misconfigured systems lacking read access to /dev/urandom or platform-equivalent sources, chrooted or jailed environments, embedded devices, or systems with non-standard or degraded randomness providers. On Go <1.24, such failures cause crypto/rand to return an error, which the Fiber v2 UUID functions currently treat as a signal to silently generate predictable UUIDs, including the zero UUID. This silent fallback is the root cause of the vulnerability.


References

  • Upstream advisory for gofiber/utils: GHSA-m98w-cqp3-qcqr

  • Source repositories:

    • github.com/gofiber/fiber
    • github.com/gofiber/utils

Credits / Reporter

Reported by @​sixcolors (Fiber Maintainer / Security Team)


Release Notes

gofiber/fiber (github.com/gofiber/fiber/v2)

v2.52.11

Compare Source

What's Changed

🧹 Updates
🐛 Bug Fixes

Full Changelog: gofiber/fiber@v2.52.10...v2.52.11

v2.52.10

Compare Source

🐛 Bug Fixes
📚 Documentation

New Contributors

Full Changelog: gofiber/fiber@v2.52.9...v2.52.10

v2.52.9

Compare Source

🐛 Bug Fixes

Full Changelog: gofiber/fiber@v2.52.8...v2.52.9

v2.52.8

Compare Source

👮 Security

🧹 Updates

🐛 Bug Fixes

📚 Documentation

Full Changelog: gofiber/fiber@v2.52.6...v2.52.8

v2.52.7

Compare Source

v2.52.6

Compare Source

🐛 Bug Fixes

📚 Documentation

🛠️ Maintenance

Full Changelog: gofiber/fiber@v2.52.5...v2.52.6

v2.52.5

Compare Source

👮 Security

Middleware/session: Session Middleware Token Injection Vulnerability - GHSA-98j2-3j3p-fw2v

https://docs.gofiber.io/api/middleware/session

🧹 Updates

  • Middleware/session: Remove extra release and aquire ctx calls in session_test.go (#​3043)

🐛 Bug Fixes

  • Middleware/monitor: middleware reporting of CPU usage (#​2984)
  • Middleware/session: mutex for thread safety (#​3050)

📚 Documentation

  • Improve ctx.Locals method description and example (#​3030)
  • Improve ctx.Locals method documentation (#​3033)
  • Update README_id.md (#​3045)

Full Changelog: gofiber/fiber@v2.52.4...v2.52.5

Thank you @​nyufeng, @​PaulTitto and @​sixcolors for making this update possible.


Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot requested a review from a team as a code owner February 9, 2026 18:39
@renovate renovate bot added the dependencies Pull requests that update a dependency file label Feb 9, 2026
@renovate
Copy link
Copy Markdown
Contributor Author

renovate bot commented Feb 9, 2026

ℹ️ Artifact update notice

File name: examples/go.mod

In order to perform the update(s) described in the table above, Renovate ran the go get command, which resulted in the following additional change(s):

  • 5 additional dependencies were updated

Details:

Package Change
github.com/google/uuid v1.5.0 -> v1.6.0
github.com/andybalholm/brotli v1.0.5 -> v1.1.0
github.com/klauspost/compress v1.17.0 -> v1.17.9
github.com/mattn/go-runewidth v0.0.15 -> v0.0.16
golang.org/x/sys v0.25.0 -> v0.28.0

@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedgithub.com/​gofiber/​fiber/​v2@​v2.52.4 ⏵ v2.52.1173 +1100 +75100100100
Updatedgithub.com/​google/​uuid@​v1.5.0 ⏵ v1.6.0100 +1100100100100

View full report

@mromaszewicz mromaszewicz merged commit bae5e57 into main Feb 9, 2026
63 checks passed
@mromaszewicz mromaszewicz deleted the renovate/examples/go-github.com-gofiber-fiber-v2-vulnerability branch February 9, 2026 21:41
szarowski pushed a commit to szarowski/oapi-codegen that referenced this pull request Feb 10, 2026
…urity] (oapi-codegen#2207)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@jamietanna jamietanna added dependencies-test-only Test-only dependencies (`internal/test` or `examples/`) and removed dependencies Pull requests that update a dependency file labels Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies-test-only Test-only dependencies (`internal/test` or `examples/`)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants