CVE-2023-41900
JSON

3.5low

Jetty's OpenId Revoked authentication allows one request

Severity
3.5low CVSS:3.1 by GitHub_M
Exploit likelihood
0.91% (higher than 61% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-pwh8-58vv-vw48

Description

Jetty is a Java based web server and servlet engine. Versions 9.4.21 through 9.4.51, 10.0.15, and 11.0.15 are vulnerable to weak authentication. If a Jetty `OpenIdAuthenticator` uses the optional nested `LoginService`, and that `LoginService` decides to revoke an already authenticated user, then the current request will still treat the user as authenticated. The authentication is then cleared from the session and subsequent requests will not be treated as authenticated. So a request on a previously authenticated session could be allowed to bypass authentication after it had been rejected by the `LoginService`. This impacts usages of the jetty-openid which have configured a nested `LoginService` and where that `LoginService` will is capable of rejecting previously authenticated users. Versions 9.4.52, 10.0.16, and 11.0.16 have a patch for this issue.

Affected

Product or packageVersionsReported by
eclipse jetty.project>= 9.4.21, <= 9.4.51, >= 10.0.0, <= 10.0.15, >= 11.0.0, <= 11.0.15CVE List
org.eclipse.jetty:jetty-openid (Maven)from 9.4.21 before 9.4.52.v20230823, from 10.0.0 before 10.0.16, from 11.0.0 before 11.0.16GitHub Advisory Database
eclipse jettyfrom 9.4.21 before 9.4.52, from 10.0.0 before 10.0.16, from 11.0.0 before 11.0.16NVD
debian debian_linux11.0, 12.0NVD

All scores

GitHub_M3.5low CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:N/A:N
GitHub3.5low CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:N/A:N
NVD4.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N

Classification

CWE-287CWE-1390

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Jetty is a Java based web server and servlet engine. Versions 9.4.21 through 9.4.51, 10.0.15, and 11.0.15 are vulnerable to weak authentication. If a Jetty `OpenIdAuthenticator` uses the optional nested `LoginService`, and that `LoginService` decides to revoke an already authenticated user, then the current request will still treat the user as authenticated. The authentication is then cleared from the session and subsequent requests will not be treated as authenticated. So a request on a previously authenticated session could be allowed to bypass authentication after it had been rejected by the `LoginService`. This impacts usages of the jetty-openid which have configured a nested `LoginService` and where that `LoginService` will is capable of rejecting previously authenticated users. Versions 9.4.52, 10.0.16, and 11.0.16 have a patch for this issue.

GitHub Advisory Database

If a Jetty OpenIdAuthenticator uses the optional nested LoginService, and that LoginService decides to revoke an already authenticated user, then the current request will still treat the user as authenticated. The authentication is then cleared from the session and subsequent requests will not be treated as authenticated.

So a request on a previously authenticated session could be allowed to bypass authentication after it had been rejected by the LoginService.

Impact

This impacts usages of the jetty-openid which have configured a nested LoginService and where that LoginService will is capable of rejecting previously authenticated users.

Original Report

working on a custom OpenIdAuthenticator, I discovered the following:

https://github.com/eclipse/jetty.project/blob/jetty-10.0.14/jetty-openid/src/main/java/org/eclipse/jetty/security/openid/OpenIdAuthenticator.java#L505

In the case where the LoginService does return that the authentication has been revoked (from the validate() call on line 463), the OpenIdAuthenticator removes the authentication from the session; however the current request still proceeds as if authenticated, since it falls through to "return authentication" on line 505.

This is fixed by moving the line 505 (and associated debug log) inside the else block that ends on line 502, instead of outside it. Then the revocation case will run through to line 517 and will trigger a new OpenId authentication which I think is correct.

I think this revocation can only occur if you do attach a separate LoginService to the OpenIdLoginService, but in that case the revoked authentication will still let the next request through (and possibly more than one if they are very close to simultaneous).

Technically I think this is a security vulnerability, if a very minor one, so I'm sending this off-list.

Patched Versions

Fixed in Jetty Versions:

Workaround

Upgrade your version of Jetty.

References
NVD (es)

Jetty es un servidor web y motor de servlet basado en Java. Las versiones 9.4.21 a 9.4.51, 10.0.15 y 11.0.15 son vulnerables a una autenticación débil. Si un `OpenIdAuthenticator` de Jetty usa el `LoginService` anidado opcional, y ese `LoginService` decide revocar a un usuario ya autenticado, entonces la solicitud actual seguirá tratando al usuario como autenticado. Luego, la autenticación se borra de la sesión y las solicitudes posteriores no se tratarán como autenticadas. Por lo tanto, se podría permitir que una solicitud en una sesión previamente autenticada omita la autenticación después de haber sido rechazada por "LoginService". Esto afecta los usos de jetty-openid que han configurado un "LoginService" anidado y donde ese "LoginService" será capaz de rechazar usuarios previamente autenticados. Las versiones 9.4.52, 10.0.16 y 11.0.16 tienen un parche para este problema.

References

Sources

SourceRecordLicence
CVE ListCVE-2023-41900 changed 2025-02-13CVE Terms of Use
GitHub Advisory DatabaseGHSA-pwh8-58vv-vw48 changed 2026-09-10CC-BY-4.0
NVDCVE-2023-41900 changed 2026-06-17Public domain