{"id":"CVE-2023-23612","published":"2023-01-24T20:36:41Z","modified":"2025-03-10T21:20:26Z","title":"Issue with whitespace in JWT roles in OpenSearch","vendor":"opensearch-project","product":"security","tier":"tail","description":{"text":"OpenSearch is an open source distributed and RESTful search engine. OpenSearch uses JWTs to store role claims obtained from the Identity Provider (IdP) when the authentication backend is SAML or OpenID Connect. There is an issue in how those claims are processed from the JWTs where the leading and trailing whitespace is trimmed, allowing users to potentially claim roles they are not assigned to if any role matches the whitespace-stripped version of the roles they are a member of. This issue is only present for authenticated users, and it requires either the existence of roles that match, not considering leading/trailing whitespace, or the ability for users to create said matching roles. In addition, the Identity Provider must allow leading and trailing spaces in role names. OpenSearch 1.0.0-1.3.7 and 2.0.0-2.4.1 are affected. Users are advised to upgrade to OpenSearch 1.3.8 or 2.5.0. There are no known workarounds for this issue.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.7,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00864,"percentile":0.59365,"provenance":"source"},"cwes":[{"id":"CWE-287","name":"Improper Authentication"}],"references":[{"url":"https://github.com/opensearch-project/security/security/advisories/GHSA-864v-6qj7-62qj","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/opensearch-project/OpenSearch/releases/tag/2.5.0","tags":["x_refsource_MISC"]}],"priority":{"score":15.2,"factors":[{"name":"EPSS percentile","points":11.87},{"name":"CVSS severity","points":3.29}]},"vendorSlug":"opensearch-project","affectedVersions":[{"vendor":"opensearch-project","product":"security","versions":[">= 2.0.0, < 2.5.0","< 1.3.8"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-03-10T20:59:30.990789Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Maven","package":"org.opensearch.plugin:opensearch-security","vulnerableRanges":["<1.3.8",">=2.0.0, <2.5.0"],"patched":["1.3.8","2.5.0"],"from":["GHSA-864v-6qj7-62qj"],"provenance":"source"}],"summary":{"text":"The OpenSearch security plugin's processing of role claims from JWTs, used with SAML or OpenID Connect authentication backends, trims leading and trailing whitespace from those claims. An already-authenticated user can claim roles they are not assigned to when a role matches the whitespace-stripped version of one of their roles, which requires either an existing matching role name or the ability to create one, and the identity provider must permit leading or trailing spaces in role names.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:38:13Z"},"euvd":{"id":"EUVD-2023-0397","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2022-35980","published":"2022-08-12","fixed":"2.2.0.0","kev":false},{"cve":"CVE-2022-41918","published":"2022-11-15","fixed":"2.4.0","kev":false,"link":{"from":"CVE-2022-41918","to":"CVE-2023-23612","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Maven:org.opensearch.plugin:opensearch-security","fromFixed":"1.3.7","toFixed":"1.3.8","daysApart":70},{"kind":"version-step","provenance":"source","package":"Maven:org.opensearch.plugin:opensearch-security","fromFixed":"2.4.0","toFixed":"2.5.0","daysApart":70}]}},{"cve":"CVE-2023-23612","published":"2023-01-24","fixed":"2.5.0","kev":false},{"cve":"CVE-2023-23613","published":"2023-01-24","fixed":"2.5.0","kev":false},{"cve":"CVE-2023-25806","published":"2023-03-02","fixed":"2.6.0","kev":false,"link":{"from":"CVE-2023-23612","to":"CVE-2023-25806","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Maven:org.opensearch.plugin:opensearch-security","fromFixed":"1.3.8","toFixed":"1.3.9","daysApart":37},{"kind":"version-step","provenance":"source","package":"Maven:org.opensearch.plugin:opensearch-security","fromFixed":"2.5.0","toFixed":"2.6.0","daysApart":37}]}},{"cve":"CVE-2023-31141","published":"2023-05-08","fixed":"2.7.0.0","kev":false}],"package":"Maven:org.opensearch.plugin:opensearch-security"}}