CVE-2023-41900: Jetty openid Jetty's OpenId Revoked Authentication Allows Vulnerability

LOW
Advisory Identifier: GHSA-pwh8-58vv-vw48
CVSS 3.5
CWE-1390 CWE-287
Published
Advisory Summary

CVE-2023-41900 is a LOW (CVSS 3.5) jetty's openid revoked authentication allows vulnerability (CWE-1390: Weak Authentication) affecting Jetty openid libraries in the Maven ecosystem. The issue involves jetty's openid revoked authentication allows one request. Remediation is available by upgrading affected packages to version 9.4.52.v20230823, 10.0.16, 11.0.16.

CVE-2023-41900 at a Glance

CVE Identifier CVE-2023-41900
GHSA Identifier GHSA-pwh8-58vv-vw48
Severity LOW
CVSS v3.1 Base Score 3.5
CWE Classification CWE-1390: Weak Authentication
Affected Product Jetty openid
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 3.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2023-41900

To remediate this vulnerability, upgrade all affected Jetty openid dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.eclipse.jetty:jetty-openid fixed: 9.4.52.v20230823
<dependency>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-openid</artifactId>
    <version>9.4.52.v20230823</version>
</dependency>
org.eclipse.jetty:jetty-openid fixed: 10.0.16
<dependency>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-openid</artifactId>
    <version>10.0.16</version>
</dependency>
org.eclipse.jetty:jetty-openid fixed: 11.0.16
<dependency>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-openid</artifactId>
    <version>11.0.16</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.eclipse.jetty

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2023-41900, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.eclipse.jetty

Analyze the terminal output to locate any version of Jetty openid in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 9.4.52.v20230823), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.eclipse.jetty command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1390: Weak Authentication, where the product uses an authentication mechanism to restrict access to specific users or identities, but the mechanism does not sufficiently prove that the claimed identity is correct. In Jetty openid, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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

CVE-2023-41900 Affected Jetty openid Versions

3 component(s)
Fixed Versions:
9.4.52.v2023082310.0.1611.0.16
Product / Package Ecosystem Affected Versions Fixed Version
org.eclipse.jetty:jetty-openid
Maven
≥ 9.4.21
< 9.4.52.v20230823
9.4.52.v20230823
org.eclipse.jetty:jetty-openid
Maven
≥ 10.0.0
< 10.0.16
10.0.16
org.eclipse.jetty:jetty-openid
Maven
≥ 11.0.0
< 11.0.16
11.0.16

References

Frequently Asked Questions

What is CVE-2023-41900?
CVE-2023-41900 is a security vulnerability in Jetty openid involving Jetty's OpenId Revoked authentication allows one request under CWE-1390: Weak Authentication.
Which Jetty openid versions are affected?
Affected versions include releases prior to 9.4.52.v20230823, 10.0.16, 11.0.16 across affected packages: org.eclipse.jetty:jetty-openid.
What version fixes CVE-2023-41900?
Upgrading to 9.4.52.v20230823, 10.0.16, 11.0.16 (or the latest patched release for your respective branch) resolves the vulnerability.
Is jetty-openid affected?
Yes, org.eclipse.jetty:jetty-openid is affected in releases prior to 9.4.52.v20230823, 10.0.16, 11.0.16. Upgrade your dependency to 9.4.52.v20230823, 10.0.16, 11.0.16 or later.
What is the CVSS score of CVE-2023-41900?
CVE-2023-41900 has a CVSS v3.1 base score of 3.5 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:N/A:N.
What CWE is associated with CVE-2023-41900?
CVE-2023-41900 is classified under CWE-1390: Weak Authentication (The product uses an authentication mechanism to restrict access to specific users or identities, but the mechanism does not sufficiently prove that the claimed identity is correct.).
How can I check Maven dependencies for CVE-2023-41900?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.eclipse.jetty'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-pwh8-58vv-vw48",
  "modified" : "2024-09-10T17:15:25Z",
  "published" : "2023-09-15T13:36:10Z",
  "aliases" : [ "CVE-2023-41900" ],
  "summary" : "Jetty's OpenId Revoked authentication allows one request",
  "details" : "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. \n\nSo a request on a previously authenticated session could be allowed to bypass authentication after it had been rejected by the `LoginService`.\n\n### Impact\nThis impacts usages of the jetty-openid which have configured a nested `LoginService` and where that `LoginService` will is capable of rejecting previously authenticated users.\n\n### Original Report\n> working on a custom OpenIdAuthenticator, I discovered the following:\n> \n> https://github.com/eclipse/jetty.project/blob/jetty-10.0.14/jetty-openid/src/main/java/org/eclipse/jetty/security/openid/OpenIdAuthenticator.java#L505\n> \n> 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.\n> \n> 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.\n> \n> 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).\n> \n> Technically I think this is a security vulnerability, if a very minor one, so I'm sending this off-list.\n\n### Patched Versions\n\nFixed in Jetty Versions:\n* 9.4.52 - fixed in PR https://github.com/eclipse/jetty.project/pull/9660\n* 10.0.16 - fixed in PR https://github.com/eclipse/jetty.project/pull/9528\n* 11.0.16 - fixed in PR https://github.com/eclipse/jetty.project/pull/9528\n* 12.0.0 - not impacted (already has fix)\n\n### Workaround\nUpgrade your version of Jetty.\n\n### References\n* https://github.com/eclipse/jetty.project/pull/9528\n* https://github.com/eclipse/jetty.project/pull/9660",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.eclipse.jetty:jetty-openid"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "9.4.21"
      }, {
        "fixed" : "9.4.52.v20230823"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 9.4.51"
    }
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.eclipse.jetty:jetty-openid"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.0.0"
      }, {
        "fixed" : "10.0.16"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 10.0.15"
    }
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.eclipse.jetty:jetty-openid"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "11.0.0"
      }, {
        "fixed" : "11.0.16"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 11.0.15"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/eclipse/jetty.project/security/advisories/GHSA-pwh8-58vv-vw48"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-41900"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/eclipse/jetty.project/pull/9528"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/eclipse/jetty.project/pull/9660"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/eclipse/jetty.project"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20231110-0004"
  }, {
    "type" : "WEB",
    "url" : "https://www.debian.org/security/2023/dsa-5507"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1390", "CWE-287" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-09-15T13:36:10Z",
    "nvd_published_at" : "2023-09-15T21:15:11Z"
  }
}