CVE-2023-23612: OpenSearch Security JWT Roles Whitespace Issue

Summary

24/01/2023
Yes i
Moderate
4.7

CVE-2023-23612: Issue with whitespace in JWT roles in OpenSearch. Affects org.opensearch.plugin:opensearch-security across 2 version ranges.

< 1.3.8 >= 2.0.0, < 2.5.0

Fixed in 1.3.8 or 2.5.0, depending on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

OpenSearch is an open-source search and analytics engine based on Elasticsearch. It provides powerful search capabilities and is widely used for various applications. The OpenSearch Security plugin is responsible for handling authentication and access control in OpenSearch. It supports JWTs (JSON Web Tokens) for storing role claims obtained from the Identity Provider (IdP) when using SAML or OpenID Connect for authentication.

Vulnerability Detail

The OpenSearch Security plugin has a vulnerability related to whitespace in JWT roles. When processing role claims from JWTs, leading and trailing whitespace is trimmed. This allows authenticated 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. However, this vulnerability requires the existence of roles that match, not considering leading/trailing whitespace, or the ability for users to create such matching roles. Additionally, the Identity Provider must allow leading and trailing spaces in role names. The impact of this vulnerability is moderate.

How To Fix

Latest published version: 3.9.0.0 as of 22 Oct 2026

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 1.3.8 1.3.8
  • >= 2.0.0, < 2.5.0 2.5.0

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

There is no specific workaround provided for this vulnerability.

Conclusion

The OpenSearch Security JWT Roles Whitespace Issue allows authenticated users to potentially claim roles they are not assigned to. It is recommended to upgrade to the patched versions of OpenSearch to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.opensearch.plugin:opensearch-security →

Share this vulnerability

FAQ

OpenSearch versions 1.0.0-1.3.7 and 2.0.0-2.4.1 are affected.

Authenticated users can potentially claim roles they are not assigned to if any role matches the whitespace-stripped version of the roles they are a member of.

The vulnerability requires the existence of roles that match, not considering leading/trailing whitespace, or the ability for users to create such matching roles. Additionally, the Identity Provider must allow leading and trailing spaces in role names.

No, this vulnerability is only present for authenticated users.

Yes, the advisory is available on the GitHub Advisory Database.

Related vulnerabilities

Recent vulnerabilities recorded for org.opensearch.plugin:opensearch-security.

How To Fix

Latest published version: 3.9.0.0 as of 22 Oct 2026

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 1.3.8 1.3.8
  • >= 2.0.0, < 2.5.0 2.5.0

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback