CVE-2026-55789 Overview
CVE-2026-55789 is an XML injection vulnerability [CWE-91] in Logto, an open-source authentication infrastructure for SaaS and AI applications. Versions prior to 1.41.0 build signed SAML responses and assertions by string-substituting user-controlled profile attributes into element-text placeholders of a SAML XML template using samlify 2.10.0. The placeholders are not escaped, allowing authenticated low-privilege users to inject XML markup through profile fields such as name, email, and custom attribute-mapping values. Logto then signs the forged SAML attribute, enabling privilege escalation at relying Service Providers that authorize based on SAML attributes.
Critical Impact
An authenticated low-privilege user can forge signed SAML attributes such as arbitrary roles, escalating privileges at downstream Service Providers that trust Logto as an Identity Provider.
Affected Products
- Logto self-hosted SAML application Identity Provider (IdP)
- Logto versions prior to 1.41.0
- Deployments using samlify version 2.10.0
Discovery Timeline
- 2026-07-10 - CVE-2026-55789 published to NVD
- 2026-07-13 - Last updated in NVD database
Technical Details for CVE-2026-55789
Vulnerability Analysis
The vulnerability resides in Logto's self-hosted SAML application Identity Provider component. Logto assembles the SAML response and assertion by performing string substitution on an XML template. User-controlled profile attributes are inserted directly into element-text positions without XML escaping. Because Logto then signs the resulting document, any injected markup becomes part of the cryptographically trusted assertion.
A low-privilege authenticated user can inject XML fragments through their own profile fields. For example, injecting an additional <saml:Attribute> element containing a privileged role value causes Logto to sign an assertion that carries attacker-controlled attributes. Relying Service Providers that authorize based on SAML attributes such as roles or group membership will honor the forged claims, resulting in privilege escalation across trust boundaries.
Root Cause
The root cause is missing output encoding when composing XML documents from untrusted input, categorized as XML Injection [CWE-91]. The upstream samlify 2.10.0 library used by Logto does not escape substituted values in element-text positions. Combined with Logto's template-substitution approach for building assertions, this allows structural manipulation of the signed XML.
Attack Vector
Exploitation requires an authenticated account on the Logto instance but does not require elevated privileges or user interaction. The attacker updates a profile attribute — such as display name, email, or a custom attribute-mapping value — to include XML markup. When the user then initiates SAML single sign-on to a downstream Service Provider, Logto emits a signed assertion containing the injected attributes.
// Security patch in packages/core/src/saml-application/SamlApplication/index.ts
// fix(core): upgrade samlify to ^2.13.0 (#9107)
}> => {
const optionalRelayState = conditional(relayState);
// TODO: fix binding method
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
- const { context, entityEndpoint } = await this.idp.createLoginResponse(
+ const loginResponse = await this.idp.createLoginResponse(
this.sp,
// @ts-expect-error --fix request object later
null,
Source: GitHub Commit 9097054
Detection Methods for CVE-2026-55789
Indicators of Compromise
- Profile attribute values containing XML metacharacters such as <, >, or SAML element names like saml:Attribute and saml:AttributeValue.
- Signed SAML assertions issued by Logto containing duplicate or unexpected attribute statements not defined in the tenant's attribute mapping.
- Service Provider audit logs showing role or group claims for users who lack corresponding entitlements in Logto.
Detection Strategies
- Inspect the Logto user profile store for fields containing XML markup or angle brackets, particularly in name, email, and custom attribute-mapping fields.
- Parse outbound SAML assertions and compare emitted attribute sets against the configured attribute-mapping policy; flag any additional or duplicated attributes.
- Correlate authentication events at Service Providers with the corresponding Logto session to identify privilege grants that exceed the source user's Logto role.
Monitoring Recommendations
- Enable verbose logging on the Logto IdP for SAML response generation and archive the signed assertions for offline review.
- Alert on profile-update API calls where field values contain <, >, <, or SAML namespace prefixes.
- Monitor Service Provider authorization decisions for sudden role escalations that follow a Logto profile update.
How to Mitigate CVE-2026-55789
Immediate Actions Required
- Upgrade Logto to version 1.41.0 or later, which upgrades samlify to ^2.13.0 and remediates the injection vector.
- Audit existing user profile records for XML markup in name, email, and custom attribute-mapping fields, and reset any offending values.
- Review Service Provider logs since deployment for authorization decisions influenced by SAML attributes that may have been forged.
Patch Information
The fix is delivered in Logto 1.41.0. The remediation upgrades the samlify dependency to ^2.13.0 and adjusts the IdP response-building flow. See the GitHub Security Advisory GHSA-vfpw-vq44-4p63, GitHub Pull Request #9107, and GitHub Release v1.41.0 for full details.
Workarounds
- Disable the self-hosted SAML application IdP feature in Logto until the upgrade is applied.
- Restrict profile self-service so that users cannot modify attributes consumed by SAML attribute mapping; require administrator review for changes.
- At relying Service Providers, tighten authorization to require attribute values from a known allowlist and reject assertions containing unexpected or duplicated attribute statements.
# Upgrade Logto to the patched version
npm install @logto/core@^1.41.0
# Verify the samlify dependency is 2.13.0 or later
npm ls samlify
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

