# CVE-2023-23612: Issue with whitespace in JWT roles in OpenSearch

- Severity: Medium 4.7 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.86%, higher than 59% of CVEs (2026-12-01)
- Published: 2023-01-24T20:36:41.876Z
- Modified: 2026-06-17T05:37:34.920Z
- Also known as: GHSA-864v-6qj7-62qj
- Weaknesses: CWE-269, CWE-287
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- opensearch-project security: >= 2.0.0, < 2.5.0; < 1.3.8
- org.opensearch.plugin:opensearch-security (Maven): before 1.3.8; from 2.0.0 before 2.5.0
- amazon opensearch: from 1.0.0 before 1.3.8; from 2.0.0 before 2.5.0

## Every score

- GitHub_M: CVSS:3.1 4.7 Medium `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:L`
- GitHub: CVSS:3.1 4.7 Medium `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:L`
- NVD: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/opensearch-project/security/security/advisories/GHSA-864v-6qj7-62qj> (third-party-advisory, web)
- <https://github.com/opensearch-project/OpenSearch/releases/tag/2.5.0> (third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-23612> (advisory)
- <https://github.com/opensearch-project/security> (package)

## Sources

- CVE List: [CVE-2023-23612](https://www.cve.org/CVERecord?id=CVE-2023-23612), CVE Terms of Use, modified 2025-03-10
- GitHub Advisory Database: [GHSA-864v-6qj7-62qj](https://github.com/advisories/GHSA-864v-6qj7-62qj), CC-BY-4.0, modified 2025-01-16
- NVD: [CVE-2023-23612](https://nvd.nist.gov/vuln/detail/CVE-2023-23612), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-23612 · Whole record: https://cve.day/CVE-2023-23612.json · Rebuilt by cve.day 2026-11-25T22:58:21.730Z
