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.
Published: 2026-07-10
Score: 6.1 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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.

Generated by OpenCVE AI on July 29, 2026 at 10:14 UTC.

Remediation

No vendor fix or workaround currently provided.

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 July 29, 2026 at 10:14 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 13 Jul 2026 19:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Mon, 13 Jul 2026 15:15:00 +0000

Type Values Removed Values Added
First Time appeared Logto-io
Logto-io logto
Vendors & Products Logto-io
Logto-io logto

Fri, 10 Jul 2026 20:00:00 +0000

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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-13T18:18:36.103Z

Reserved: 2026-06-15T22:58:06.564Z

Link: CVE-2026-54714

cve-icon Vulnrichment

Updated: 2026-07-13T18:18:32.829Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-29T10:15:06Z

Weaknesses
  • CWE-79

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