Eclipse Jetty: Early return from the JASPIAuthenticator code can potentially no clear ThreadLocal variables
### Description (as reported) A security vulnerability has been identified in Jetty's `JaspiAuthenticator.java`. The root cause is a failure to consistently clear authentication metadata stored in `ThreadLocal` during certain error or incomplete authentication flows. Specifically, after a `GroupPrincipalCallback` is persisted into the `ThreadLocal`, the authentication process may exit prematurely — before the `ThreadLocal` storage is cleared — if a mandatory `CallerPrincipalCallback` is missing or an exception occurs. This allows a subsequent, unprivileged user processed by the same worker thread to inherit these residual security roles, leading to Broken Access Control and Privilege Escalation. See also attached PDF. ### Impact An unauthenticated user may gain ungrated privileges from a previous request (privilege escalation). ### Patches No patches yet. ### Workarounds Do not use Jetty's JASPI.
describes (1)
Related CVEs.
| ID | severity | exploitable | ||
|---|---|---|---|---|
| CVE-2026-5795US | — | — | ||
In Eclipse Jetty, the class JASPIAuthenticator initiates the authentication checks, which set two ThreadLocal variable.
Upon returning from the initial checks, there are conditio… | ||||
references
External citations — patches, advisories, analysis.
- https://github.com/jetty/jetty.projectPACKAGE
- https://github.com/jetty/jetty.project/security/advisories/GHSA-r7p8-xq5m-436cWEB
- https://github.com/user-attachments/files/26118760/JaspiAuthenticator_Security_Report.pdfWEB
- https://gitlab.eclipse.org/security/cve-assignment/-/issues/92WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-5795ADVISORY
Advisories like this name the exposed products attackers go after on your perimeter. See what is exposed on your perimeter with a free passive scan.
Free scan