CVE-2026-72789: Golang Jwt Static Subject Claim

The JWT 'sub' (subject) claim is assigned a hardcoded string literal instead of a dynamic user identifier. In JWT specifications (RFC 7519), the 'sub' claim identifies the principal subject of the token. Hardcoding this value causes all issued tokens to share an identical subject claim, which can allow anonymous or unprivileged users to bypass access control

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0Go
greprules fetch cve-2026-72789-golang-jwt-static-subject-claim --engine opengrep

Description

The JWT 'sub' (subject) claim is assigned a hardcoded string literal instead of a dynamic user identifier. In JWT specifications (RFC 7519), the 'sub' claim identifies the principal subject of the token. Hardcoding this value causes all issued tokens to share an identical subject claim, which can allow anonymous or unprivileged users to bypass access control