Feb 15, 2026·6 min read·81 visits
The go-tuf library attempts to parse untrusted JSON metadata using unsafe Go type assertions. A malicious mirror can send syntactically valid but structurally incorrect JSON (e.g., wrong types for known fields), causing the client to panic and crash immediately. This creates a Denial of Service condition that prevents updates, reachable without authentication or signing keys.
A critical Denial of Service vulnerability exists in the go-tuf library, the Go implementation of The Update Framework (TUF). By serving malformed metadata JSON, a compromised repository mirror or Man-in-the-Middle attacker can trigger a runtime panic in the client. Crucially, this crash occurs during the parsing phase, before cryptographic signatures are verified, allowing an attacker without signing keys to disable the update mechanism across a fleet of devices.
The Update Framework (TUF) is the gold standard for software supply chain security. It’s the architectural equivalent of a paranoid bank vault, designed specifically to operate in hostile environments where repository mirrors might be compromised. The entire premise of TUF is: "We don't trust the mirror to tell the truth; we only trust the cryptographic signatures on the metadata."
But here is the irony: before you can verify a signature, you have to read the message. And if reading the message causes your brain to explode, the signature doesn't matter. That is exactly what happened in go-tuf.
This vulnerability isn't about stealing keys or injecting malware directly; it's about the fragility of code handling untrusted input. By exploiting a quirk in how Go handles interfaces, an attacker can turn a standard update check into a SIGABRT, effectively freezing a fleet of clients in time, unable to ever update again.
To understand this bug, you need to understand Go's type system. Go is statically typed, but it offers the interface{} (or any) type to handle dynamic data like JSON. When you unmarshal an arbitrary JSON blob, you often get a map[string]any.
To use that data, you have to tell Go what it is. "Trust me, compiler, this field is a string." In code, that looks like value.(string).
Here is the catch: If you are wrong—if value is actually an integer, or nil—Go doesn't just return an error. It panics. It flips the table and terminates the process immediately. This is a "Reachable Assertion" (CWE-617).
The developers of go-tuf wrote code that assumed the JSON structure coming from a mirror would always match the TUF specification. They chained these assertions together, walking through the JSON tree without a safety net. If a mirror sends a JSON object where the signed field is a string instead of a map, the application crashes hard.
The vulnerability lived in metadata/metadata.go. The code was trying to determine the type of metadata (e.g., root, targets, snapshot) by inspecting the _type field inside the signed object.
Here is the smoking gun from the vulnerable version:
// The Vulnerable Code
// Assumption 1: "signed" exists and is a map
// Assumption 2: "_type" exists inside that map and is a string
signedType := m["signed"].(map[string]any)["_type"].(string)Do you see the problem? It is a one-liner of doom. If m["signed"] is present but is actually a float, the first .(...) panics. If it is a map but _type is missing or is a boolean, the second .(...) panics.
The fix, introduced in version 2.3.1, replaces this cowboy coding with the "comma-ok" idiom, which is the standard, safe way to do type assertions in Go:
// The Fixed Code
// Check if "signed" is a map
signed, ok := m["signed"].(map[string]any)
if !ok {
return &ErrValue{Msg: "metadata 'signed' field is missing or not an object"}
}
// Check if "_type" is a string
signedType, ok := signed["_type"].(string)
if !ok {
return &ErrValue{Msg: "no _type found in signed"}
}This change transforms a fatal crash into a manageable error that the client can log and ignore, allowing it to perhaps try a different mirror.
Exploiting this does not require a genius-level IQ or supercomputers. It requires a text editor. The attack vector is the repository mirror. In a real-world scenario, an attacker might compromise a CDN node, a mirror server, or perform a Man-in-the-Middle attack on HTTP traffic (since TUF is designed to work over plain HTTP, relying on signatures for security).
Here is the attack flow:
root.json from the mirror.{
"signatures": [],
"signed": "This should be a map, but I made it a string just to watch you cry."
}go-tuf client receives this. It successfully unmarshals the JSON (because it is valid JSON). It then attempts m["signed"].(map[string]any). Since "signed" is a string, the runtime panics.Because this check happens before signature verification, the attacker does not need any private keys. They just need to be in the network path.
At first glance, a crash sounds annoying but not catastrophic. In the context of an update framework, however, Availability is a security property.
If an attacker can crash the update client at will, they can enforce a "version freeze." Imagine a fleet of IoT devices with a known critical vulnerability (say, a remote root exploit). The vendor releases a patch. The devices wake up to download the patch.
The attacker, controlling a mirror or a specific network segment, serves the malformed JSON. Every single device crashes the moment it tries to update. The devices remain vulnerable to the root exploit indefinitely.
Furthermore, because the panic crashes the entire Go process, if the TUF client is integrated directly into a larger application (e.g., a microservice or a daemon) rather than running as a separate CLI tool, the entire application goes down. This escalates the issue from "cannot update" to "service outage."
The remediation is straightforward: update the library. The patch was released in version 2.3.1.
To patch your Go project:
go get github.com/theupdateframework/go-tuf@v2.3.1
go mod tidyIf you are a developer using go-tuf, you should also audit your own code for similar patterns. Search your codebase for direct type assertions (.(type)) on data that originates from external sources (user input, files, network requests). Always use the two-value assignment form (val, ok := x.(T)) to handle unexpected types gracefully without crashing the runtime.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
go-tuf theupdateframework | >= 2.0.0, < 2.3.1 | 2.3.1 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-617 (Reachable Assertion) |
| Attack Vector | Network (Mirror/MitM) |
| CVSS v3.1 | 5.9 (Medium) |
| EPSS Score | 0.02% |
| Impact | Denial of Service (DoS) |
| Exploit Status | Trivial (PoC available in unit tests) |
| Language | Go |
Reachable Assertion
NATS Server prior to versions 2.12.8 and 2.14.3 contains an incorrect authorization vulnerability (CWE-863) in its message tracing subsystem. When evaluating whether a connection is permitted to publish trace events to a destination subject specified in the Nats-Trace-Dest header, the server only checks standard client permissions and omits permission checks for leaf node connections. This allows a connected leaf node operator with restricted publishing privileges to emit internal trace events to unauthorized subjects and suppress standard message delivery using the Nats-Trace-Only header.
CVE-2026-63341 is a high-severity Denial of Service (DoS) vulnerability in the Aedes MQTT broker for Node.js affecting all versions prior to 1.1.1. The flaw stems from missing input validation on the hierarchical depth of incoming MQTT topic strings before they are passed to the underlying topic-matching engine, qlobber. Because qlobber enforces a hardcoded limit of 100 topic levels and throws a synchronous exception when this threshold is exceeded, an attacker can send a single MQTT packet containing 101 or more forward-slash-separated levels to trigger an uncaught exception that immediately terminates the Node.js broker process.
CVE-2026-61725 is a path traversal vulnerability (CWE-22) in the sevenz-rust2 Cargo package prior to version 0.21.1. The vulnerability occurs because the decompression utility fails to validate or sanitize archive entry filenames before joining them with the destination directory path via std::path::Path::join. An attacker who supplies a crafted 7z archive containing parent directory traversal sequences or absolute paths can write or overwrite arbitrary files on the host filesystem with the privileges of the extracting process.
CVE-2026-77309 (GHSA-jrjx-9jjw-747m) is a high-severity unauthenticated remote code execution vulnerability affecting NASA-AMMOS AIT-GUI versions 1.0.0 through 2.5.0. The flaw results from chaining an incomplete file cleanup error in the telemetry query endpoint (/tlm/query) with a directory traversal flaw in the script execution endpoint (/script/run). An attacker on an adjacent network can stage arbitrary Python statements into a static file on disk and execute that file under the privileges of the AIT-GUI web server process.
A vulnerability classified under CWE-116 (Improper Encoding or Escaping of Output) exists in memtomem-stm versions 0.1.0 through 0.1.33. The software acts as a Model Context Protocol (MCP) short-term memory proxy gateway for AI agent architectures. When surfacing retrieved memories and scratchpad items into downstream Large Language Model (LLM) context envelopes, the SurfacingFormatter component fails to properly sanitize untrusted memory attributes. An attacker with the ability to plant untrusted content into the agent's long-term or working memory store can inject arbitrary structural delimiters, close the <surfaced-memories> XML boundary prematurely, visually obscure instructions using Unicode bidirectional overrides, and execute stored prompt injection attacks against downstream LLM agents.
CVE-2026-77331 (GHSA-72jh-722p-rqr3) is a concurrency and session-state synchronization vulnerability in memtomem-stm, a short-term memory proxy gateway for AI agents. In versions 0.1.2 prior to 0.1.34, concurrent Model Context Protocol (MCP) Remote Procedure Call (RPC) failures or mid-flight task cancellations can initiate duplicate reconnect loops and permit dirty or cancelled transport sessions to be reused. This deficiency results in session-state integrity loss and local service degradation.