JWT signature verification authentication bypass in ServiceStack
CVE-2020-28042 is an authentication bypass vulnerability in ServiceStack affecting versions before 5.9.2. The flaw is caused by improper JWT signature verification, specifically acceptance of tokens with an invalid or effectively null signature unless the application implemented a custom ValidateToken function that enforced a valid minimum signature length. As a result, an attacker can forge arbitrary JWTs and have them accepted as authentic by applications relying on affected ServiceStack JWT authentication. Because JWT claims are commonly used to represent identity, session state, and authorization context, successful exploitation allows an attacker to submit attacker-controlled tokens that the application treats as valid.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
Successful exploitation allows authentication and authorization bypass in applications that rely on affected ServiceStack JWT handling. An attacker can forge JWTs containing arbitrary claims and impersonate users or assign elevated roles or privileges, depending on how the application consumes token claims. This can lead to unauthorized access to protected API endpoints and compromise of session and privilege controls implemented through JWT-based authentication.
If you can’t patch tonight, do this now.
If immediate upgrade is not possible, implement strict custom token validation that rejects JWTs with missing, empty, malformed, or undersized signatures and enforces expected signing algorithms and key handling. Reduce reliance on client-supplied JWT claims for authorization decisions where possible, add server-side validation of privilege context, and monitor for anomalous authentication events that may indicate forged token use. These measures are compensating controls and do not replace upgrading to a fixed ServiceStack release.
Patch, then assume compromise.
Upgrade ServiceStack to version 5.9.2 or later, which fixes the JWT signature verification flaw. Review all applications using affected ServiceStack JWT authentication to ensure they are running a non-vulnerable version. Where custom token validation logic is used, verify that signature validation is correctly enforced and that malformed, missing, or undersized signatures are rejected. After remediation, re-test JWT authentication flows to confirm that forged or null-signature tokens are no longer accepted.
2 exploits validated by Mallory's analysis.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
2 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.