GHSA-3jp4-mhh4-gcgr: Kimai/kimai Kimai Has An Open Redirect Vulnerability
LOWGHSA-3jp4-mhh4-gcgr is a LOW (CVSS 0.0) kimai has an open redirect vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Kimai/kimai libraries in the Packagist ecosystem. The issue involves kimai has an open redirect via unvalidated relaystate in saml acs handler. Remediation is available by upgrading affected packages to version 2.53.0.
GHSA-3jp4-mhh4-gcgr at a Glance
Security Impact
CVSS: 0.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:N/A:N).
How to Fix GHSA-3jp4-mhh4-gcgr
To remediate this vulnerability, upgrade all affected Kimai/kimai dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade kimai/kimai to 2.53.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for kimai/kimai
How to Check if You Are Affected
To determine whether your application is affected by GHSA-3jp4-mhh4-gcgr, inspect your project dependencies for Kimai/kimai:
inspect dependencies for kimai/kimai
Analyze the terminal output to locate any version of Kimai/kimai in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.53.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In Kimai/kimai, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-3jp4-mhh4-gcgr Affected Kimai/kimai Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
kimai/kimai
|
Packagist |
< 2.53.0
|
2.53.0
|
References
Frequently Asked Questions
What is GHSA-3jp4-mhh4-gcgr?
Which Kimai/kimai versions are affected?
What version fixes GHSA-3jp4-mhh4-gcgr?
Is kimai/kimai affected?
What is the CVSS score of GHSA-3jp4-mhh4-gcgr?
What CWE is associated with GHSA-3jp4-mhh4-gcgr?
How can I check Packagist dependencies for GHSA-3jp4-mhh4-gcgr?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3jp4-mhh4-gcgr",
"modified" : "2026-04-14T01:06:06Z",
"published" : "2026-04-14T01:06:06Z",
"aliases" : [ ],
"summary" : "Kimai has an Open Redirect via Unvalidated RelayState in SAML ACS Handler",
"details" : "### Summary\n\nThe 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.\n\n*Requires SAML to be enabled (non-default configuration).*\n\n### Details\n\nVulnerable file: `src/Saml/Security/SamlAuthenticationSuccessHandler.php`\n\n```php\n// Line 27-33\n$relayState = $request->request->get('RelayState', $request->query->get('RelayState'));\nif (\\is_scalar($relayState)) {\n $relayState = (string) $relayState;\n if ($relayState !== $this->httpUtils->generateUri($request, (string) $this->options['login_path'])) {\n return $relayState; // No host/scheme validation — any URL accepted\n }\n}\n```\n\nThe 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.\n\nThe existing unit test `SamlAuthenticationSuccessHandlerTest::testRelayState()` confirms this behavior — an absolute URL in `RelayState` results in a redirect to that URL with no restriction.\n\n### Steps to Reproduce\n\n```\n1. Enable SAML authentication in Kimai\n2. Configure a SAML IdP (e.g., SimpleSAMLphp)\n3. Initiate IdP-initiated SSO with RelayState=https://attacker.com\n — or intercept the ACS POST and modify RelayState to https://attacker.com\n4. Complete SAML authentication at the IdP\n5. Observe: after the SAMLResponse POST to /saml/acs, Kimai issues:\n HTTP/1.1 302 Found\n Location: https://attacker.com\n```\n\nCode-confirmed via unit test (`testRelayState`): `onAuthenticationSuccess` with `RelayState=http://localhost/relayed` redirects directly to that URL. External URLs follow the same code path.\n\n### Impact\n\nWhile 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.\n\nIn 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).\n\n### Fix\n\nThe `RelayState` is validated before redirecting, see #5878\n\n- It may not contain a host or port and cannot start with `//`. \n- If it contains a host, it must match the current host.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "kimai/kimai"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.53.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.52.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/kimai/kimai/security/advisories/GHSA-3jp4-mhh4-gcgr"
}, {
"type" : "WEB",
"url" : "https://github.com/kimai/kimai/pull/5878"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/kimai/kimai"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-601" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-14T01:06:06Z",
"nvd_published_at" : null
}
}