4.7medium
Issue with whitespace in JWT roles in OpenSearch
- Severity
- 4.7medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.86% (higher than 59% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-864v-6qj7-62qj
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| opensearch-project security | >= 2.0.0, < 2.5.0, < 1.3.8 | CVE List |
| org.opensearch.plugin:opensearch-security (Maven) | before 1.3.8, from 2.0.0 before 2.5.0 | GitHub Advisory Database |
| amazon opensearch | from 1.0.0 before 1.3.8, from 2.0.0 before 2.5.0 | NVD |
All scores
| GitHub_M | 4.7medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:L |
| GitHub | 4.7medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:L |
| NVD | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Classification
What each source says
CVE List
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.
GitHub Advisory Database
Advisory title: Issue with whitespace in JWT roles
Affected versions:
OpenSearch 1.0.0-1.3.7 and 2.0.0-2.4.1
Patched versions:
OpenSearch 1.3.8 and 2.5.0
Impact:
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.
Patches:
OpenSearch versions 1.3.8 and 2.5.0 contain a fix for this issue.
For more information:
If you have any questions or comments about this advisory, please contact AWS/Amazon Security via our issue reporting page (https://aws.amazon.com/security/vulnerability-reporting/) or directly via email to aws-security@amazon.com. Please do not create a public GitHub issue.
NVD (es)
OpenSearch es un motor de búsqueda RESTful y distribuido de código abierto. OpenSearch utiliza JWT para almacenar reclamaciones de funciones obtenidas del proveedor de identidad (IdP) cuando el backend de autenticación es SAML u OpenID Connect. Existe un problema en la forma en que se procesan esas reclamaciones desde los JWT donde se recortan los espacios en blanco iniciales y finales, lo que permite a los usuarios reclamar roles a los que no están asignados si algún rol coincide con la versión sin espacios en blanco de los roles de los que son miembros. Este problema solo está presente para usuarios autenticados y requiere la existencia de roles que coincidan, sin considerar los espacios en blanco iniciales/finales, o la capacidad de los usuarios de crear dichos roles coincidentes. Además, el proveedor de identidad debe permitir espacios iniciales y finales en los nombres de funciones. OpenSearch 1.0.0-1.3.7 y 2.0.0-2.4.1 se ven afectados. Se recomienda a los usuarios que actualicen a OpenSearch 1.3.8 o 2.5.0. No se conocen workarounds para este problema.
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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-23612 changed 2025-03-10 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-864v-6qj7-62qj changed 2025-01-16 | CC-BY-4.0 |
| NVD | CVE-2023-23612 changed 2026-06-17 | Public domain |