GHSA-3JP4-MHH4-GCGR

GHSA-3JP4-MHH4-GCGR is a low-severity open redirect vulnerability in kimai/kimai (composer), affecting versions <= 2.52.0. It is fixed in 2.53.0.

Summary

The SAML authentication success handler in Kimai returns the RelayState POST parameter as a redirect destination without validating the host or scheme. After a user successfully authenticates via SAML, they are redirected to an attacker-controlled URL if the IdP includes a malicious RelayState value. This enables phishing attacks that steal credentials or session tokens post-SSO.

Requires SAML to be enabled (non-default configuration).

Details

Vulnerable file: src/Saml/Security/SamlAuthenticationSuccessHandler.php

// Line 27-33
$relayState = $request->request->get('RelayState', $request->query->get('RelayState'));
if (\is_scalar($relayState)) {
    $relayState = (string) $relayState;
    if ($relayState !== $this->httpUtils->generateUri($request, (string) $this->options['login_path'])) {
        return $relayState;  // No host/scheme validation, any URL accepted
    }
}

The only check is that RelayState does not equal the configured login_path. Any external URL (e.g., https://attacker.com) passes this check and is returned as the redirect destination.

The existing unit test SamlAuthenticationSuccessHandlerTest::testRelayState() confirms this behavior, an absolute URL in RelayState results in a redirect to that URL with no restriction.

Steps to Reproduce

1. Enable SAML authentication in Kimai
2. Configure a SAML IdP (e.g., SimpleSAMLphp)
3. Initiate IdP-initiated SSO with RelayState=https://attacker.com
  , or intercept the ACS POST and modify RelayState to https://attacker.com
4. Complete SAML authentication at the IdP
5. Observe: after the SAMLResponse POST to /saml/acs, Kimai issues:
   HTTP/1.1 302 Found
   Location: https://attacker.com

Code-confirmed via unit test (testRelayState): onAuthenticationSuccess with RelayState=http://localhost/relayed redirects directly to that URL. External URLs follow the same code path.

Impact

While this bug exists it has low practical possibilities and the attacker needs to be able to create a SAML request, meaning either admin access to an IdP supporting such an action OR access to the private SAML keys / certificates.

In other words: only exploitable in IdP-initiated SSO flows where the IdP includes a RelayState value supplied by the attacker (e.g., via a malicious link to the IdP).

Untrusted input controls a URL used for redirection, which can forward users to attacker-controlled sites. Typical impact: phishing and credential harvesting via a trusted domain.

Affected versions

kimai/kimai (<= 2.52.0)

Security releases

kimai/kimai → 2.53.0 (composer)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

The RelayState is validated before redirecting, see #5878

  • It may not contain a host or port and cannot start with //.
  • If it contains a host, it must match the current host.

Frequently Asked Questions

  1. What is GHSA-3JP4-MHH4-GCGR? GHSA-3JP4-MHH4-GCGR is a low-severity open redirect vulnerability in kimai/kimai (composer), affecting versions <= 2.52.0. It is fixed in 2.53.0. Untrusted input controls a URL used for redirection, which can forward users to attacker-controlled sites.
  2. Which versions of kimai/kimai are affected by GHSA-3JP4-MHH4-GCGR? kimai/kimai (composer) versions <= 2.52.0 is affected.
  3. Is there a fix for GHSA-3JP4-MHH4-GCGR? Yes. GHSA-3JP4-MHH4-GCGR is fixed in 2.53.0. Upgrade to this version or later.
  4. Is GHSA-3JP4-MHH4-GCGR exploitable, and should I be worried? Whether GHSA-3JP4-MHH4-GCGR is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether GHSA-3JP4-MHH4-GCGR is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix GHSA-3JP4-MHH4-GCGR? Upgrade kimai/kimai to 2.53.0 or later.

Other vulnerabilities in kimai/kimai

CVE-2026-44298CVE-2026-42267CVE-2026-41498CVE-2026-40486CVE-2026-40479

Stop the waste.
Protect your environment with Kodem.