Security
Headlines
HeadlinesLatestCVEs

Headline

GHSA-pwh8-58vv-vw48: Jetty's OpenId Revoked authentication allows one request

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:

  • 9.4.52 - fixed in PR https://github.com/eclipse/jetty.project/pull/9660
  • 10.0.16 - fixed in PR https://github.com/eclipse/jetty.project/pull/9528
  • 11.0.16 - fixed in PR https://github.com/eclipse/jetty.project/pull/9528
  • 12.0.0 - not impacted (already has fix)

Workaround

Upgrade your version of Jetty.

References

  • https://github.com/eclipse/jetty.project/pull/9528
  • https://github.com/eclipse/jetty.project/pull/9660
ghsa
#vulnerability#git#java#auth#maven
  1. GitHub Advisory Database
  2. GitHub Reviewed
  3. CVE-2023-41900

Jetty’s OpenId Revoked authentication allows one request

Low severity GitHub Reviewed Published Sep 14, 2023 in eclipse/jetty.project • Updated Sep 15, 2023

Package

maven org.eclipse.jetty:jetty-openid (Maven)

Affected versions

>= 9.4.21, <= 9.4.51

>= 10.0.0, <= 10.0.15

>= 11.0.0, <= 11.0.15

Patched versions

9.4.52

10.0.16

11.0.16

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:

  • 9.4.52 - fixed in PR eclipse/jetty.project#9660
  • 10.0.16 - fixed in PR eclipse/jetty.project#9528
  • 11.0.16 - fixed in PR eclipse/jetty.project#9528
  • 12.0.0 - not impacted (already has fix)

Workaround

Upgrade your version of Jetty.

References

  • eclipse/jetty.project#9528
  • eclipse/jetty.project#9660

References

  • GHSA-pwh8-58vv-vw48
  • eclipse/jetty.project#9528
  • eclipse/jetty.project#9660

Published to the GitHub Advisory Database

Sep 15, 2023

Last updated

Sep 15, 2023

Related news

CVE-2023-22130: Oracle Critical Patch Update Advisory - October 2023

Vulnerability in the Sun ZFS Storage Appliance product of Oracle Systems (component: Core). The supported version that is affected is 8.8.60. Difficult to exploit vulnerability allows unauthenticated attacker with network access via HTTP to compromise Sun ZFS Storage Appliance. Successful attacks of this vulnerability can result in unauthorized ability to cause a hang or frequently repeatable crash (complete DOS) of Sun ZFS Storage Appliance. CVSS 3.1 Base Score 5.9 (Availability impacts). CVSS Vector: (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H).

Debian Security Advisory 5507-1

Debian Linux Security Advisory 5507-1 - Multiple security vulnerabilities were found in Jetty, a Java based web server and servlet engine.

CVE-2023-41900: Bring back some openid improvements from 10.0.x to 9.4.x by lachlan-roberts · Pull Request #9660 · eclipse/jetty.project

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.