
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-22747 is an unauthorized user impersonation vulnerability in Spring Security affecting the SubjectX500PrincipalExtractor component. The extractor does not correctly handle certain malformed X.509 certificate CN (Common Name) values, causing it to read the wrong username and potentially allowing an attacker to impersonate another user. It affects Spring Security versions 7.0.0 through 7.0.4 (Maven package org.springframework.security:spring-security-web), and was disclosed on April 22, 2026. The CVSS v3.1 base score is 6.8 (Moderate) per GitHub Advisory, or 8.1 per NVD, reflecting a network-exploitable authentication bypass with high confidentiality and integrity impact (Spring Advisory, GitHub Advisory).
The root cause is classified as CWE-297 (Improper Validation of Certificate with Host Mismatch): SubjectX500PrincipalExtractor fails to correctly parse certain malformed X.509 certificate CN values, causing it to extract the wrong username from the certificate subject. An attacker with a low-privileged account can craft a specially malformed certificate such that the extractor reads a different user's identity, enabling impersonation. Importantly, Spring's advisory notes this component sits behind the pre-authentication flow, which assumes upstream trust validation has already occurred — exploitation therefore presupposes some compromise or bypass of that upstream trust, making this more of a defense-in-depth fix than a standalone critical attack path. The fix applies only to SubjectX500PrincipalExtractor and not the deprecated SubjectDnX509PrincipalExtractor (Spring Advisory, GitHub Advisory).
Successful exploitation allows an authenticated low-privileged attacker to impersonate another user within the application, gaining unauthorized access to that user's resources and permissions. This results in high confidentiality impact (access to another user's data) and high integrity impact (ability to perform actions as another user), with no availability impact. The scope is limited to the affected application instance, but lateral movement within the application's authorization model is possible depending on the impersonated user's privilege level (Spring Advisory, GitHub Advisory).
There is no confirmed in-the-wild exploitation of CVE-2026-22747 as of the time of reporting. A GitHub repository (https://github.com/F1n1Sh3r/cve-2026-22747-lab) was identified as a potential PoC, but Feedly's analysis assessed it as a placeholder or non-functional repository with no meaningful exploit content. The EPSS score is approximately 0.031% (9th percentile), indicating a low probability of exploitation in the near term. The vulnerability is not listed in the CISA KEV catalog, and no threat actor attribution has been reported (GitHub Advisory, Feedly).
SubjectX500PrincipalExtractor for username extraction.SubjectX500PrincipalExtractor to parse and return a different user's username (e.g., by exploiting ambiguous DN parsing or special character handling).The primary remediation is to upgrade Spring Security to version 7.0.5 or later, which contains the fix for SubjectX500PrincipalExtractor (Spring Advisory, GitHub Advisory). As a workaround if immediate patching is not possible, restrict X.509 certificate-based authentication to certificates from tightly controlled, trusted certificate authorities, and implement additional server-side validation of certificate CN values to reject malformed inputs. Organizations should also review certificate issuance policies to prevent malformed CN values from being signed by trusted CAs. Note that the deprecated SubjectDnX509PrincipalExtractor is not addressed by this fix and should be avoided.
HeroDevs published a blog post covering this CVE as part of a broader analysis of Spring Security's April 2026 security advisories, which included seven CVEs (HeroDevs Blog). The Spring team's advisory notably framed the fix as "defense-in-depth" rather than a standalone critical patch, given the pre-authentication trust dependency, which tempered community concern. General community sentiment appears measured, consistent with the moderate severity rating and low EPSS score.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."