CVE-2026-116587: Go Rsa Private Key Validate Without Size And Consistency Bounds

An rsa.PrivateKey is assembled from parsed values and passed to Validate()/Precompute() without first bounding the modulus size (e.g. if $n.BitLen() > limit) and checking p * q == n. When the key material originates from untrusted input (JSON/JWK/protocol fields), crafted large or degenerate RSA parameters make validation consume cubic CPU time on Go 1.24+,

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0Go
greprules fetch cve-2026-116587-go-rsa-private-key-validate-without-size-and-consistency-bounds --engine opengrep

Description

An rsa.PrivateKey is assembled from parsed values and passed to Validate()/Precompute() without first bounding the modulus size (e.g. if $n.BitLen() > limit) and checking p * q == n. When the key material originates from untrusted input (JSON/JWK/protocol fields), crafted large or degenerate RSA parameters make validation consume cubic CPU time on Go 1.24+,