Description
The JobRunr dashboard serves its frontend files from the classpath. StaticFileHttpHandler builds the classpath resource name by appending the decoded request path to the dashboard root (org/jobrunr/dashboard/frontend/build/) without rejecting .. segments. A client can therefore read arbitrary resources from the application classpath, for example service-account.json .
Who can exploit it depends on the edition:
- JobRunr OSS: an unauthenticated client, when the dashboard is publicly available and basic authentication is not configured, which is the default. The dashboard binds to all network interfaces, so it is reachable from the network by default.
- JobRunr Pro: only users who are authenticated on the dashboard.
Details
In StaticFileHttpHandler:
- The request path is percent-decoded, so
%2e%2ebecomes... com.sun.net.httpserver.HttpServerdoes not normalize the path.- Any path containing
/static/is treated as a static file, which skips the file extension allowlist entirely. - The result is passed to
ClassLoader.getResource.
When the classpath contains directories (exploded deployments, WEB-INF/classes, IDE runs, layered container images), the class loader resolves .. and returns txt, json, js and image resources outside the dashboard root.
Impact
Disclosure of txt, json, js and image resources: configuration files with secrets, credentials, keys, and compiled classes.
Mitigation
Upgrade to the fixed version for your release line. No configuration change is needed after the upgrade.
If you cannot upgrade right away, these reduce the exposure:
- Do not expose the dashboard port to untrusted networks.
- Protect the dashboard with authentication.
