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

- Priority: **Routine**
- Reason: Not severe (CVSS 4.7, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2023-01-24 · Modified: 2025-03-10
- Aliases: UBUNTU-CVE-2023-23612, GHSA-864v-6qj7-62qj
- Record: https://cvemate.com/vulnerability/CVE-2023-23612 · JSON: https://cvemate.com/vulnerability/CVE-2023-23612/json

## 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.
```

## Signals

- CVSS: 8.8 high (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.864%, percentile 59.873%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- amazon opensearch: ≥ 1.0.0, \< 1.3.8 \| ≥ 2.0.0, \< 2.5.0
- ubuntu opensearch (Ubuntu): All versions (No fix recorded)
- org.opensearch.plugin opensearch-security (Maven): \< 1.3.8 \| ≥ 2.0.0, \< 2.5.0
- opensearch-project security: ≥ 2.0.0, \< 2.5.0 \| \< 1.3.8

## References

- <https://github.com/opensearch-project/security/security/advisories/GHSA-864v-6qj7-62qj>
- <https://github.com/opensearch-project/OpenSearch/releases/tag/2.5.0>
- <https://ubuntu.com/security/CVE-2023-23612>
- <https://www.cve.org/CVERecord?id=CVE-2023-23612>
- <https://nvd.nist.gov/vuln/detail/CVE-2023-23612>
- <https://github.com/opensearch-project/security>

---

Data as of 2026-12-05T06:33:06.726Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
