[GHSA-m9gh-789g-q5pv] Elasticsearch PKI Realm Authentication Bypass Vulnerability Allows User Impersonation Through Crafted Client Certificates - #9596
Open
levpachmanov wants to merge 1 commit into
Conversation
github-actions
Bot
changed the base branch from
main
to
levpachmanov/advisory-improvement-9596
September 17, 2026 11:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates
Comments
The advisory lists
org.elasticsearch:elasticsearch, but the vulnerable code is not inthat artifact. The flaw is in
PkiRealm.getPrincipalFromSubjectDN, which extracts theauthenticated principal by running
username_pattern(defaultCN=(.*?)(?:,|$)) withMatcher.find()over the string form of the certificate subject DN, so a cert holderwho controls any RDN value can embed a second
CN=in it and be authenticated asanother user. That class lives in
x-pack/plugin/securityand ships inorg.elasticsearch.plugin:x-pack-security; the default pattern lives inPkiRealmSettingsinorg.elasticsearch.plugin:x-pack-core. The publishedorg.elasticsearch:elasticsearchjar contains none of it — zero entries forPkiRealm,RdnField,DerParser,X509AuthenticationTokenorauthc/pki. Nor doesany upstream source name a Maven coordinate: Elastic's CVE record declares the product
Elasticsearch. The version data, by contrast, is correct and verifies directly againstthe artifacts: the fix adds
RdnFieldExtractor.class, which is absent inx-pack-security8.19.7, 9.1.7 and 9.2.1 and present in 8.19.8, 9.1.8 and 9.2.2 —matching all three
fixedboundaries exactly. This change therefore renames the packageon all three entries and leaves every range untouched.
x-pack-securityis publishedcontinuously from 6.8.11 to 9.5.4, so every currently-flagged version keeps a Maven
signal after the change.