Summary
Traccar GPS tracking deployments up to and including version 6.11.1 contain an open redirect flaw in two OIDC-related endpoints, where the redirect_uri parameter is not validated against a trusted list.
An authenticated attacker can abuse this to siphon OAuth 2.0 authorization codes to attacker-controlled URLs, which can then be exchanged for access tokens and used to take over accounts on applications integrated via OAuth with Traccar.
Affected context
The vulnerability arises in Traccar's OpenID Connect (OIDC) / OAuth 2.0 integration endpoints that process the redirect_uri parameter during the authorization flow.
In affected deployments, these endpoints do not strictly verify that redirect_uri values belong to a pre-approved, trusted set of callback URLs.
This becomes risky when Traccar is used as an identity provider or participates in OAuth-based SSO, because authorization codes meant for legitimate client applications can be redirected to attacker-controlled domains.
Exploit preconditions
- Attack surface: HTTP(S) endpoints exposed by Traccar's OIDC/OAuth functionality.
- Required access: An attacker must be an authenticated user in the Traccar instance (for example, any valid Traccar account).
- Trigger point: The attacker initiates or coerces a victim into initiating an OAuth/OIDC login/authorization flow that hits the vulnerable endpoints, supplying a malicious
redirect_uripointing to an attacker-controlled URL. - Why exploitation is possible: The server does not enforce a whitelist or strict matching of registered redirect URIs, so it will append OAuth authorization codes to arbitrary attacker-chosen URLs and redirect the user agent there.
Why this happens
This issue is rooted in improper validation of the redirect_uri parameter within the OIDC/OAuth 2.0 authorization sequence.
Instead of verifying that the provided redirect_uri exactly matches (or is strictly constrained to) a pre-registered, trusted callback URL for the client, the implementation allows arbitrary external URLs, resulting in a classic open redirect scenario.
In an OAuth context, this behavior maps to CWE-601: URL Redirection to Untrusted Site, with additional aspects of CWE-352: Cross-Site Request Forgery-like flow confusion, because the legitimate authorization response (including the authorization code) is delivered to a location under attacker control.
Abstractly, the insecure pattern is: the authorization server trusts a client-supplied redirect URL without binding it to the client's registered configuration, allowing sensitive tokens or codes to be sent off-site.
Potential impact
- Attackers may capture OAuth 2.0 authorization codes intended for legitimate applications.
- Captured codes could be exchanged for access or ID tokens, enabling account takeover in OAuth-integrated applications.
- Compromised accounts can lead to data exposure, manipulation of tracking data, or abuse of user-specific features.
- Attackers may pivot across multiple applications that rely on Traccar as an identity or authorization provider.
- Users may be exposed to phishing campaigns that appear to originate from legitimate login flows.
General mitigation guidance
Effective mitigation focuses on tightening the handling of redirect URIs and enforcing strict OAuth/OIDC best practices:
- Enforce a whitelist of registered redirect URIs per OAuth client and reject any authorization request whose
redirect_uridoes not match a registered value. - Require exact or strongly constrained matching (e.g., full string match, or strict scheme/host/path enforcement) for redirect URIs, avoiding wildcards or overly broad domain patterns.
- Avoid reflecting arbitrary URLs in redirects; when an unrecognized or malformed
redirect_uriis provided, return an error instead of performing a redirect. - Limit the data included in redirects to what is strictly necessary, and avoid exposing authorization codes or tokens to untrusted origins.
- Apply least privilege in OAuth scopes so that compromise of a single authorization code has a constrained impact.
- Consider implementing short-lived authorization codes with single-use semantics and strong binding to client ID and redirect URI to reduce the value of intercepted codes.
How teams detect issues like this
Detection generally involves reviewing both configuration and code paths that process redirect_uri and related parameters:
- Code review: Examine OIDC/OAuth endpoint handlers to confirm that they compare incoming
redirect_urivalues against a server-side list of registered URIs for each client. Flags include: - Direct use of user-controlled
redirect_uriin redirects without checks. - Use of partial string matching or substring checks instead of exact/bounded matching.
- Static analysis: Configure rules to detect:
- Redirects based on user input (
redirect_uri,returnUrl,next, etc.) without validation. - Construction of
Locationheaders or redirect responses using untrusted parameters. - Dynamic testing: Use security testing tools or automated integration tests to:
- Attempt OAuth flows with clearly malicious or external
redirect_urivalues and confirm they are rejected. - Verify that authorization codes are only ever delivered to registered callback endpoints.
- Logging and monitoring: Enable detailed logging for OAuth/OIDC flows, and alert on:
- Redirects to unrecognized domains.
- Unusual patterns of authorization requests specifying external URLs as redirect URIs.

