CVE-2026-54714

Logto: XSS via unescaped RelayState in SAML auto-submit form

Published Jul 10, 2026 CVSS 3.1 · 6.1 Medium EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The Logto core library reflected SAML RelayState, SAMLResponse, and actionUrl directly into an auto‑submit HTML form without escaping, creating a reflected cross‑site scripting flaw. Attacker‑supplied data is injected into the user’s browser, allowing script execution in the context of the Logto tenant origin after the user completes SAML authentication. The weakness is a classic instance of CWE‑79.

Affected Systems

The vulnerability affects Logto installations (logto‑io:logto) with any version released before 1.41.0. All legacy deployments that have not applied the 1.41.0 migration are susceptible.

Risk and Exploitability

The CVSS base score is 6.1, indicating medium severity. The EPSS score is < 1%, suggesting a very low exploitation probability, and the flaw is not listed in CISA KEV. Exploitation requires the attacker to craft a SAML authentication request containing a malicious RelayState, so the attack vector is the SAML login flow exposed by /api/saml/:id/authn. Once the victim completes authentication, the injected script will execute with the user’s privileges on the Logto tenant origin.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Logto to version 1.41.0, which removes unescaped output from the auto‑submit form.
  • If an upgrade cannot be performed immediately, isolate the affected SAML applications and enforce that RelayState values come only from trusted sources or are validated against a whitelist to prevent injection.
  • Apply a Content Security Policy that blocks inline scripts on the Logto tenant origin to reduce the impact of any remaining reflected XSS vectors.

Generated by OpenCVE AI on August 1, 2026 at 12:13 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Logto-io
Logto-io logto
Vendors & Products Logto-io
Logto-io logto
Type Values Removed Values Added
Description 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.
Title Logto: XSS via unescaped RelayState in SAML auto-submit form
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 13, 2026, 6:18 PM
Reserved
Jun 15, 2026, 10:58 PM
Status
Deferred
Published
Jul 10, 2026, 8:16 PM
Modified
Oct 25, 2026, 3:10 PM