Summary
A path-parsing mismatch in Traccar's media routing can let an unauthenticated attacker bypass session and device authorization checks. If the attacker knows or guesses a device unique ID and media filename, they may retrieve a protected media file.
A path-parsing mismatch in Traccar's media routing can let an unauthenticated attacker bypass session and device authorization checks. If the attacker knows or guesses a device unique ID and media filename, they may retrieve a protected media file.
Affected context
The issue affects Traccar versions from 5.1 through 6.15.0 in the /api/media/* route. It occurs when the MediaFilter and Jetty ResourceServlet interpret a semicolon-containing path differently, allowing the request to reach the media resource despite the filter's authorization checks. Reverse proxies that reject or rewrite semicolon path parameters may prevent this request from reaching the vulnerable routing behavior.
The issue affects Traccar versions from 5.1 through 6.15.0 in the /api/media/* route. It occurs when the MediaFilter and Jetty ResourceServlet interpret a semicolon-containing path differently, allowing the request to reach the media resource despite the filter's authorization checks. Reverse proxies that reject or rewrite semicolon path parameters may prevent this request from reaching the vulnerable routing behavior.
Exploit preconditions
- Attack surface: The Traccar media API must be reachable over HTTP.
- Required access: No authenticated session is required; the attacker needs to know or guess a device unique ID and media filename.
- Trigger point: A request to
/api/media/*containing a semicolon at the Servlet boundary. - Why exploitation is possible: The MediaFilter and Jetty ResourceServlet assign different routing meanings to the path, so the resource may be served without the filter's session and device authorization checks.
- Attack surface: The Traccar media API must be reachable over HTTP.
- Required access: No authenticated session is required; the attacker needs to know or guess a device unique ID and media filename.
- Trigger point: A request to
/api/media/*containing a semicolon at the Servlet boundary. - Why exploitation is possible: The MediaFilter and Jetty ResourceServlet assign different routing meanings to the path, so the resource may be served without the filter's session and device authorization checks.
Why this happens
The routing components interpret noncanonical paths inconsistently. The MediaFilter applies session and device authorization checks to one interpretation, while Jetty may dispatch the semicolon-containing path to the ResourceServlet as a request for the protected file. This is an authorization bypass using an alternate path, mapping to CWE-288; the resulting exposure of protected information is also related to CWE-200.
The routing components interpret noncanonical paths inconsistently. The MediaFilter applies session and device authorization checks to one interpretation, while Jetty may dispatch the semicolon-containing path to the ResourceServlet as a request for the protected file. This is an authorization bypass using an alternate path, mapping to CWE-288; the resulting exposure of protected information is also related to CWE-200.
Potential impact
- An unauthenticated attacker could retrieve protected device media.
- Depending on what a deployment stores, disclosed files may include photographs, audio, video, or other uploaded content.
- The demonstrated impact is read-only disclosure; the advisory does not establish file modification, directory listing, traversal, account takeover, denial of service, or code execution.
- An unauthenticated attacker could retrieve protected device media.
- Depending on what a deployment stores, disclosed files may include photographs, audio, video, or other uploaded content.
- The demonstrated impact is read-only disclosure; the advisory does not establish file modification, directory listing, traversal, account takeover, denial of service, or code execution.
General mitigation guidance
Mitigation generally focuses on making authorization and resource routing use the same canonical path interpretation.
Common defensive patterns include:
- Rejecting ambiguous or noncanonical paths before routing or authorization.
- Applying authorization checks to the final resolved resource and its device ownership.
- Using consistent path normalization rules across filters, proxies, and servlet handlers.
- Restricting access to the media endpoint and applying least-privilege controls to stored media.
- Configuring reverse proxies to reject or safely normalize semicolon path parameters where appropriate.
Mitigation generally focuses on making authorization and resource routing use the same canonical path interpretation.
Common defensive patterns include:
- Rejecting ambiguous or noncanonical paths before routing or authorization.
- Applying authorization checks to the final resolved resource and its device ownership.
- Using consistent path normalization rules across filters, proxies, and servlet handlers.
- Restricting access to the media endpoint and applying least-privilege controls to stored media.
- Configuring reverse proxies to reject or safely normalize semicolon path parameters where appropriate.
How teams detect issues like this
High-level detection approaches include:
- Reviewing routing and authorization code for inconsistent path normalization across filters, proxies, and resource handlers.
- Using static analysis or code review checks to identify authorization decisions made before canonical resource resolution.
- Monitoring requests to media endpoints for semicolon-containing or otherwise noncanonical paths, and reviewing unexpected unauthenticated media responses.
- Enforcing route and path-normalization policies in security tests and CI checks.
High-level detection approaches include:
- Reviewing routing and authorization code for inconsistent path normalization across filters, proxies, and resource handlers.
- Using static analysis or code review checks to identify authorization decisions made before canonical resource resolution.
- Monitoring requests to media endpoints for semicolon-containing or otherwise noncanonical paths, and reviewing unexpected unauthenticated media responses.
- Enforcing route and path-normalization policies in security tests and CI checks.

