Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconIdentify Logto tenant with SAML app enabled
-
DeliveryEnumerate valid SAML application ID
-
ExploitCraft malicious RelayState payload in /api/saml/:id/authn URL
-
InstallDeliver link to victim via phishing
-
C2Victim completes SAML login flow
-
ExecuteInjected script executes on Logto tenant origin
-
ImpactHarvest session tokens or OIDC credentials
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The SAML application feature must be configured and active in the Logto instance - this is not a default-on feature for all Logto deployments and requires deliberate administrative setup of a SAML application. The attacker must know or enumerate a valid SAML application identifier (:id in the /api/saml/:id/authn route). The victim must follow the attacker-crafted link and complete the SAML authentication flow (UI:R from CVSS vector confirms mandatory user interaction). The attacker requires no authentication credentials of their own (PR:N from CVSS). Exploitation is limited to Logto instances with externally accessible SAML endpoints; instances deployed with /api/saml routes behind internal-only network access significantly reduce the realistic attack surface. |
| Impact | The CVSS 3.1 base score of 6.1 (AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N) accurately reflects a network-accessible, low-complexity reflected XSS with a scope change. The scope change (S:C) is the most significant signal: execution on the Logto identity provider origin is materially more dangerous than XSS on a typical application, because it can expose session tokens, OIDC refresh tokens, or administrative credentials for the entire tenant. No EPSS score was provided in the intelligence data, so exploitation probability cannot be quantified. The vulnerability is not listed in CISA KEV, and no standalone public exploit code is identified; the GitHub fix commit (209fa0a5) and PR #9008 are publicly visible and could be reverse-engineered to craft payloads, moderately lowering the exploitation barrier. The mandatory user-interaction step (UI:R - victim must complete a SAML login flow) limits opportunistic mass exploitation, but targeted attacks against specific Logto tenants using phishing or malicious links are realistic. Overall: medium-priority, elevated by the identity-provider context; should be patched promptly rather than deferred. |
| Exploit ScenarioDerived | An attacker identifies a publicly accessible Logto tenant with SAML federation enabled and discovers (or enumerates) a valid SAML application ID. They construct a malicious URL to /api/saml/:id/authn with a crafted RelayState parameter containing an HTML-attribute-breaking payload (e.g., closing an attribute and injecting an onerror handler), then deliver this link to a target user via phishing email. When the victim clicks the link and completes their normal SAML login, the Logto-generated auto-submit form renders the unescaped RelayState, executing the injected script in the victim's browser under the Logto tenant origin, potentially harvesting session cookies or OIDC tokens. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 10, 2026
Reflected XSS in Logto's SAML application flow allows unauthenticated remote attackers to inject and execute arbitrary JavaScript on the Logto tenant origin by supplying a crafted RelayState parameter. Versions prior to 1.41.0 of @logto/core reflect the SAML RelayState, SAMLResponse, and actionUrl directly into an auto-submit HTML form without HTML-attribute escaping, meaning a victim who follows a crafted SAML authentication link and completes the login sequence will execute attacker-controlled script within the identity provider's origin context. No active exploitation has been confirmed (not in CISA KEV) and no public exploit code has been identified at time of analysis, though a GitHub security advisory and fix commit are publicly available.
RemediationAI
Upgrade Logto to version 1.41.0 or later, which contains the HTML-attribute escaping fix applied in commit 209fa0a5cbe8522f9cf31873239dc6424099bb5e (PR #9008). The official release is available at https://github.com/logto-io/logto/releases/tag/v1.41.0 and the security advisory is at https://github.com/logto-io/logto/security/advisories/GHSA-cpm5-w86q-w85f. If immediate upgrade is not feasible, a compensating control is to disable SAML application functionality entirely within the Logto admin console, eliminating the vulnerable code path; this trade-off is that any SAML-federated service providers relying on Logto as an IdP will lose authentication capability. Network-layer controls (blocking external access to /api/saml/:id/authn) can reduce attack surface if Logto is only used for internal SAML federation, but will not protect against threats originating from the internal network. Content Security Policy headers, if configurable via a reverse proxy in front of Logto, can limit the impact of injected scripts but are not a substitute for the code fix.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Logto is an open-source, self-hosted authentication and authorization infrastructure implementing OIDC and SAML protocols, targeting SaaS and AI application developers. The flaw resides in packages/core/src/saml-application/SamlApplication/utils.ts, where the SAML RelayState - an opaque passthrough string defined by the SAML protocol to allow service providers to maintain state across the authentication redirect loop - along with SAMLResponse and actionUrl, are interpolated into an auto-submit HTML form template without HTML-attribute escaping. CWE-79 (Improper Neutralization of Input During Web Page Generation) is the root cause class: unsanitized user-supplied data reaches an HTML rendering context, enabling injection of event handlers or script tags. Because the form is served from the Logto tenant origin, successful injection yields same-origin script execution against the identity provider itself, which may hold session cookies, OIDC tokens, and administrative interfaces.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Network-delivered reflected XSS, no attacker privileges needed, victim must complete login (UI:R), scope changes to Logto origin; no availability impact.
Primary rating from Vendor (github).
CVSS VectorVendor: github
Lifecycle Timeline
1DescriptionCVE.org
Logto is the modern, open-source auth infrastructure for SaaS and AI apps. Prior to 1.41.0, @logto/core reflected the SAML RelayState, SAMLResponse, and actionUrl into a Logto-origin auto-submit HTML form in packages/core/src/saml-application/SamlApplication/utils.ts without HTML-attribute escaping. A SAML application flow with a crafted RelayState from GET or POST /api/saml/:id/authn could inject script that runs on the Logto tenant origin after the user completes login. This issue is fixed in version 1.41.0.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
EUVD-2026-43009
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB