{"vuln_id":"CVE-2026-119299","aliases":["GHSA-358w-w75h-x6rx","CVE-2026-65819","GHSA-8mcr-459q-5mx2"],"description":"gopacket: SCTP chunk sub-decoder out-of-bounds panics on crafted segments","published_at":"2026-11-10T15:56:49Z","modified_at":"2026-11-23T20:40:55.552562Z","first_seen_at":"2026-11-23T21:06:31.543904Z","severity":"medium","severity_source":"native","cvss_score":5.9,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","cwe":["CWE-125","CWE-129"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.00464,"epss_percentile":0.41024,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-119299"},"matched_alias":null,"items":[{"id":16645,"source":{"id":"osv","name":"OSV.dev"},"title":"GO-2026-6963: gopacket: SCTP chunk sub-decoder out-of-bounds panics on crafted segments in github.com/gopacket/gopacket","summary":"gopacket: SCTP chunk sub-decoder out-of-bounds panics on crafted segments in github.com/gopacket/gopacket\n\nAffected: Go:github.com/gopacket/gopacket\n\nFixed in: 1.7.2\n\nReferences:\nhttps://github.com/gopacket/gopacket/security/advisories/GHSA-358w-w75h-x6rx\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-119299\nhttps://github.com/gopacket/gopacket/commit/508044327cc2c065b3db753c010a027e7d1ca621\nhttps://github.com/gopacket/gopacket/releases/tag/v1.7.2","url":"https://osv.dev/vulnerability/GO-2026-6963","published_at":"2026-11-23T20:04:10Z","updated_at":"2026-11-23T20:30:13.542642Z","fetched_at":"2026-11-23T21:06:31.109639Z","severity":"medium","cvss_score":5.9,"epss":0.00464,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"github.com/gopacket/gopacket","vuln_id":"CVE-2026-119299","vuln_ids":["CVE-2026-119299","CVE-2026-65819","GHSA-358W-W75H-X6RX","GHSA-8MCR-459Q-5MX2","GO-2026-6963"],"tags":["osv","go","fix-available"],"cluster_id":14774,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/16645","html":"https://vulnwatch.ve1ve2.com/item/16645"}},{"id":16590,"source":{"id":"osv","name":"OSV.dev"},"title":"GHSA-358w-w75h-x6rx: gopacket: SCTP chunk sub-decoder out-of-bounds panics on crafted segments","summary":"gopacket: SCTP chunk sub-decoder out-of-bounds panics on crafted segments\n\n## Summary\n\ngopacket decodes SCTP (IP protocol 132) by walking the chunk chain through per-chunk-type decoder functions (`decodeSCTPInit`, `decodeSCTPShutdown`, `decodeSCTPError`, `decodeSCTPSack`, in `layers/sctp.go`). Each of these reads fixed-size header fields and runs count-driven loops **without validating the chunk's declared length against the minimums those reads require**. A single crafted SCTP segment causes a runtime panic (out-of-bounds slice read, or inverted slice from unsigned length arithmetic) on any decode path that does not install gopacket's per-packet panic recovery (`gopacket.DecodeOptions.SkipDecodeRecovery: true`); with the default API the same input degrades to a per-packet decode error.\n\nThe defect is present in every released version through `v1.7.1` and at current `master` (18c5805). It is the SCTP component named - but not remediated - in CVE-2026-65819 (`GHSA-8mcr-459q-5mx2`, \"Multiple layer decoders panic …\", patched per advisory metadata in `v1.7.1`). The `v1.7.1` hardening commit `b772f56` (\"layers:various: add protocol decoder length checks (#163)\") added generic bounds to the chunk dispatcher and `decodeSCTPChunk`, but left every chunk *sub-decoder* without a per-type minimum-length check. The advisory's own description lists \"SCTP chunk/parameter decoders (`sctp.go`)\" among items \"being confirmed; they should be remediated together with the above\" - this report demonstrates that, at `v1.7.1` and `HEAD`, that remediation still does not exist.\n\n## Patches\n\nFixed in **v1.7.2** by commit [`5080443`](https://github.com/gopacket/gopacket/commit/5080443) (\"layers/sctp: bound chunk sub-decoders and parameters\"). INIT/INIT-ACK, SACK and SHUTDOWN now check their chunk type's minimum length, SACK rejects gap-ack and duplicate-TSN counts the chunk can't hold, and `decodeSCTPParameter` rejects TLV lengths below 4 or beyond the buffer. Each case returns a decode error instead of panicking. The same commit fixes a panic on valid input, where a final parameter's padding lies outside the chunk length (RFC 9260 3.2). Regression tests: `TestDecodeSCTPChunkRegression` and `TestDecodeSCTPParameterPadding` in `layers/decode_oob_test.go`.\n\nUpgrade with `go get github.com/gopacket/gopacket@v1.7.2`.\n\n## Workarounds\n\nBefore v1.7.2, keep panic recovery on: use `gopacket.NewPacket` without `SkipDecodeRecovery`, and `DecodingLayerParser` with `IgnorePanic: false`. The crafted packet then fails to decode instead of crashing the process.\n\n## Vulnerability Details\n\nAll line numbers refer to `layers/sctp.go` at commit `18c5805028329a6a8944f054d8d3f64ebc0f1373` (master, 2026-09-01; `v1.7.1-1-g18c5805`).\n\nThe shared entry point already present in `v1.7.1` validates only that a chunk is present and that its declared length is ≥ 4 and covered by real bytes:\n\n```go\n// sctp.go:129\nfunc decodeSCTPChunk(data []byte) (SCTPChunk, error) {\n\tif len(data) < 4 { ... }\n\tlength := binary.BigEndian.Uint16(data[2:4])\n\tif length < 4 { ... }\n\tactual := roundUpTo\n\nAffected: Go:github.com/gopacket/gopacket\n\nFixed in: 1.7.2\n\nReferences:\nhttps://github.com/gopacket/gopacket/security/advisories/GHSA-358w-w75h-x6rx\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-119299\nhttps://github.com/gopacket/gopacket/commit/508044327cc2c065b3db753c010a027e7d1ca621\nhttps://github.com/gopacket/gopacket\nhttps://github.com/gopacket/gopacket/releases/tag/v1.7.2","url":"https://osv.dev/vulnerability/GHSA-358w-w75h-x6rx","published_at":"2026-11-10T15:56:49Z","updated_at":"2026-11-23T20:40:55.552562Z","fetched_at":"2026-11-23T21:06:31.109590Z","severity":"medium","cvss_score":5.9,"epss":0.00464,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"github.com/gopacket/gopacket","vuln_id":"CVE-2026-119299","vuln_ids":["CVE-2026-119299","CVE-2026-65819","GHSA-358W-W75H-X6RX","GHSA-8MCR-459Q-5MX2","GO-2026-6963"],"tags":["osv","go","fix-available"],"cluster_id":14773,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/16590","html":"https://vulnwatch.ve1ve2.com/item/16590"}}]}