CVE-2026-25899: Fiber is Vulnerable to Denial of Service via Flash Cookie Unbounded Allocation

Published Feb 24, 2026
·
Updated

Summary The use of the fiberflash cookie can force an unbounded allocation on any server. A crafted 10-character cookie value triggers an attempt to allocate up to 85GB of memory via unvalidated msgpack deserialization. No authentication is required. Every GoFiber v3 endpoint is affected regardless of whether the application uses flash messages.

Details Regardless of configuration, the flash cookie is checked:

go func (app App) requestHandler(rctx fasthttp.RequestCtx) { // Acquire context from the pool ctx := app.AcquireCtx(rctx) defer app.ReleaseCtx(ctx)

// Optional: Check flash messages rawHeaders := d.Request().Header.RawHeaders() if len(rawHeaders) > 0 && bytes.Contains(rawHeaders, flashCookieNameBytes) { d.Redirect().parseAndClearFlashMessages() } , err = app.next(d) } else { // Check if the HTTP method is valid if ctx.getMethodInt() == -1 { = ctx.SendStatus(StatusNotImplemented) //nolint:errcheck // Always return nil return }

// Optional: Check flash messages rawHeaders := ctx.Request().Header.RawHeaders() if len(rawHeaders) > 0 && bytes.Contains(rawHeaders, flashCookieNameBytes) { ctx.Redirect().parseAndClearFlashMessages() } }

The cookie value is hex-decoded and passed directly to msgpack deserialization with no size or content validation:

https://github.com/gofiber/fiber/blob/f8f34f642fb3682c341ede7816e7cf861aa7df89/redirect.go#L371

go // parseAndClearFlashMessages is a method to get flash messages before they are getting removed func (r Redirect) parseAndClearFlashMessages() { // parse flash messages cookieValue, err := hex.DecodeString(r.c.Cookies(FlashCookieName)) if err != nil { return }

, err = r.c.flashMessages.UnmarshalMsg(cookieValue) if err != nil { return }

r.c.Cookie(&Cookie{ Name: FlashCookieName, Value: "", Path: "/", MaxAge: -1, }) }

The auto-generated tinylib/msgp deserialization reads a uint32 array header from the attacker-controlled byte stream and passes it directly to make() with no bounds check:

https://github.com/gofiber/fiber/blob/f8f34f642fb3682c341ede7816e7cf861aa7df89/redirectmsgp.go#L242

go // UnmarshalMsg implements msgp.Unmarshaler func (z redirectionMsgs) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0002 uint32 zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts) if err != nil { err = msgp.WrapError(err) return o, err } if cap((z)) >= int(zb0002) { (z) = (z)[:zb0002] } else { (z) = make(redirectionMsgs, zb0002) } for zb0001 := range z { bts, err = (z)[zb0001].UnmarshalMsg(bts) if err != nil { err = msgp.WrapError(err, zb0001) return o, err } } o = bts return o, err }

where zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts) translates the attacker-controlled value into the element count and make(redirectionMsgs, zb0002) performs the unbounded allocation

So we can craft a gofiber cookie that will force a huge allocation: curl -H "Cookie: fiberflash=dd7fffffff" http://localhost:5000/hello

The cookie val is a hex-encoded msgpack array32 header: - dd = msgpack array32 marker - 7fffffff = 2 147 483 647 elements

Impact Unauthenticated remote Denial of Service (CWE-789). Anyone running a gofiber v3.0.0 or v3 server is affected. The flash cookie parsing is hardcoded.

Other sources

Fiber is an Express inspired web framework written in Go. In versions on the v3 branch prior to 3.1.0, the use of the fiberflash cookie can force an unbounded allocation on any server. A crafted 10-character cookie value triggers an attempt to allocate up to 85GB of memory via unvalidated msgpack deserialization. No authentication is required. Every GoFiber v3 endpoint is affected regardless of whether the application uses flash messages. Version 3.1.0 fixes the issue.

NVD

Affected Software

2 affected componentsFixes available
go/github.com/gofiber/fiber/v3<=3.0.0
3.1.0
gofiber Fiber Go>=3.0.0<3.1.0

Event History

Feb 24, 2026
Advisory Published
via GitHub·08:57 PM
Data Sourced
via GitHub·08:57 PM
DescriptionSeverityWeaknessAffected Software
CVE Published
via MITRE·09:11 PM
Data Sourced
via MITRE·09:11 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:16 PM
DescriptionSeverityWeaknessAffected Software
Jan 23, 58126
Event
via FIRST·07:38 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-25899?

CVE-2026-25899 is classified as a high-severity vulnerability due to its potential for unbounded memory allocation and denial of service.

2

How do I fix CVE-2026-25899?

To remediate CVE-2026-25899, upgrade your GoFiber package to version 3.1.0 or later.

3

What are the affected versions for CVE-2026-25899?

CVE-2026-25899 affects all versions of GoFiber v3 up to and including 3.0.0.

4

What type of attack does CVE-2026-25899 allow?

CVE-2026-25899 allows attackers to cause denial of service through unbounded memory allocation triggered by a specially crafted cookie.

5

Is authentication required to exploit CVE-2026-25899?

No, CVE-2026-25899 can be exploited without any form of authentication.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203