CVE-2026-58491: Warpgate: Reflected XSS in SSO return endpoint via attacker-controlled next parameter
Warpgate is an open source SSH, HTTPS and MySQL bastion host for Linux. Prior to 0.25.5, the /@warpgate/api/sso/providers/:name/start endpoint stores an attacker-controlled next parameter that the POST /@warpgate/api/sso/return handler inserts without HTML escaping into the response generated by warpgate-protocol-http/src/api/ssoproviderlist.rs. A victim who follows a crafted link and completes SSO can cause markup and JavaScript to execute in the authenticated Warpgate origin, allowing access to session data and actions through user APIs, and through administrator APIs only when the victim is an administrator. The GET /@warpgate/api/sso/return path also uses the same unvalidated value as a redirect destination, enabling an open redirect. This issue is fixed in version 0.25.5.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Warpgateto a version that resolves this vulnerability.Fixed in 0.25.5 - Compensating control
As a mitigation while upgrading, restrict access to the SSO endpoints (/@warpgate/api/sso/providers/:name/start and /@warpgate/api/sso/return) to trusted users/administrators so crafted SSO links are less likely to be followed by victims.
Event History
Frequently Asked Questions
Which users are at risk if they follow a crafted link?
Any user who follows the crafted link and completes SSO can have attacker-supplied markup and JavaScript run in the authenticated Warpgate origin. This can expose session data and permit actions through user APIs; administrator APIs are exposed only when the victim is an administrator.
What does an attacker need to exploit the issue?
The attacker needs to supply a crafted next parameter through the SSO provider start endpoint and persuade a victim to follow the resulting link and complete SSO. No attacker authentication is stated as required.
Are deployments affected by an open redirect as well as XSS?
Yes. The GET SSO return path uses the same unvalidated next value as a redirect destination, so it can be used for an open redirect.
What version resolves the issue?
Upgrade Warpgate to version 0.25.5. Versions prior to 0.25.5 are affected.