VYPR
Moderate severityOSV Advisory· Published Jan 22, 2026· Updated Jan 22, 2026

go-tuf affected by client DoS via malformed server response

CVE-2026-23991

Description

go-tuf is a Go implementation of The Update Framework (TUF). Starting in version 2.0.0 and prior to version 2.3.1, if the TUF repository (or any of its mirrors) returns invalid TUF metadata JSON (valid JSON but not well formed TUF metadata), the client will panic during parsing, causing a denial of service. The panic happens before any signature is validated. This means that a compromised repository/mirror/cache can DoS clients without having access to any signing key. Version 2.3.1 fixes the issue. No known workarounds are available.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
github.com/theupdateframework/go-tuf/v2Go
< 2.3.12.3.1

Affected products

1

Patches

1
73345ab6b0eb

Perform type assertion (#710)

https://github.com/theupdateframework/go-tufFredrik SkogmanJan 19, 2026via ghsa
2 files changed · +18 2
  • internal/testutils/signer/signer.go+9 1 modified
    @@ -187,7 +187,15 @@ func getTUFMDRole(p string) (string, error) {
     	if err := json.Unmarshal(mdBytes, &m); err != nil {
     		return "", fmt.Errorf("failed to parse TUF metadata: %w", err)
     	}
    -	signedType := m["signed"].(map[string]any)["_type"].(string)
    +	signed, ok := m["signed"].(map[string]any)
    +	if !ok {
    +		return "", fmt.Errorf("metadata 'signed' field is missing or not an object")
    +	}
    +	signedType, ok := signed["_type"].(string)
    +	if !ok {
    +		return "", fmt.Errorf("no _type found in signed")
    +	}
    +
     	switch signedType {
     	case metadata.ROOT:
     		fallthrough
    
  • metadata/metadata.go+9 1 modified
    @@ -900,7 +900,15 @@ func checkType[T Roles](data []byte) error {
     	if err := json.Unmarshal(data, &m); err != nil {
     		return err
     	}
    -	signedType := m["signed"].(map[string]any)["_type"].(string)
    +	signed, ok := m["signed"].(map[string]any)
    +	if !ok {
    +		return &ErrValue{Msg: "metadata 'signed' field is missing or not an object"}
    +	}
    +	signedType, ok := signed["_type"].(string)
    +	if !ok {
    +		return &ErrValue{Msg: "no _type found in signed"}
    +	}
    +
     	switch i.(type) {
     	case *RootType:
     		if ROOT != signedType {
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

5

News mentions

0

No linked articles in our index yet.