Skip to content

SSO user can login as another SSO only user

Moderate
Eugeny published GHSA-868r-97g5-r9g4 Jul 10, 2023

Package

warpgate (Binary)

Affected versions

v0.7.2

Patched versions

v0.7.3

Description

Summary

Short summary of the problem. Make the impact and severity as clear as possible. For example: An unsafe deserialization vulnerability allows any unauthenticated user to execute arbitrary code on the server.

When SSO(i only check custom sso with on-premiss gitlab), I can login another user with sso user or password user.

Details

Give all details on the vulnerability. Pointing to the incriminated source code is very helpful for the maintainer.

  • 2 user with Sngle sign-on enabled(victim / my-real-user)
  • In login interface, Username=(victim), and push Enter button(not sso nor Login button)
  • SSO interface(for me, on-premiss gitlab), login my-real-user
  • login success with victim user

PoC

Complete instructions, including specific configuration details, to reproduce the vulnerability.
I write details.

Impact

What kind of vulnerability is it? Who is impacted?

any users with only sso(without totp) or only password(without totp)

detail my config

environment: docker-compose + ghcr.io/warp-tech/warpgate:latest(ea9291a75109, v0.7.2? web interface says v0.7.1)

docker log is:

warpgate_1  | 02:06:19 ERROR HTTP: Auth rejected
warpgate_1  | 02:06:19  WARN HTTP: Request failed method=POST url=https://warpgate-onpremiss-domain.domain:port/@warpgate/api/auth/login status=401 Unauthorized
warpgate_1  | 02:06:20  INFO HTTP: Request method=GET url=https://warpgate-onpremiss-domain.domain:port/@warpgate/api/sso/providers/custom/start status=200 OK
warpgate_1  | 02:06:20  INFO HTTP: SSO login as $my-real-username@mail-domain
warpgate_1  | 02:06:20  INFO HTTP: Authenticated username=victim
warpgate_1  | 02:06:20  INFO HTTP: Request method=GET url=https://warpgate-onpremiss-domain.domain:port/@warpgate/api/sso/return?code=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&state=XXXXXXXXXXXXXXXXXXXXXX status=307 Temporary Redirect
warpgate_1  | 02:06:20  INFO HTTP: Request method=GET url=https://warpgate-onpremiss-domain.domain:port/@warpgate status=200 OK session=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX session_username=victim
warpgate_1  | 02:06:20  INFO HTTP: Request method=GET url=https://warpgate-onpremiss-domain.domain:port/@warpgate/api/info status=200 OK session=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX session_username=victim

victim:

  • credentials
    • SSO
  • Auth policy
    • SSH: In-browser auth
    • HTTP: SSO
    • MySQL: none
  • User roles
    • warpgate:admin

my-real-user:

  • credentials:
    • SSO
  • Auth policy
    • SSH: In-browser auth
    • HTTP: SSO
    • MySQL: none
  • User roles
    • none

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
Low
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:L/A:N

CVE ID

CVE-2023-37268

Weaknesses

No CWEs

Credits