CVE-2026-24831: Openssl Tonelli Shanks Infinite Loop

Infinite loop vulnerability in Tonelli-Shanks algorithm implementation. The loop terminates using an exact equality check (`i == e`) combined with an increment (`i++`) before the check. If `e` is 1, `i` increments to 2 and bypasses the `e` check. When the evaluated modulo is not prime, this bypass causes the loop to run indefinitely, leading to a Denial of S

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0C
greprules fetch cve-2026-24831-openssl-tonelli-shanks-infinite-loop --engine opengrep

Description

Infinite loop vulnerability in Tonelli-Shanks algorithm implementation. The loop terminates using an exact equality check (`i == e`) combined with an increment (`i++`) before the check. If `e` is 1, `i` increments to 2 and bypasses the `e` check. When the evaluated modulo is not prime, this bypass causes the loop to run indefinitely, leading to a Denial of S