Summary
JimuReport through version 2.5.0 exposes a report auto-export API without enforcing authentication or authorization, allowing anyone to request report data by ID.
When deployed in a network-accessible environment, an unauthenticated attacker can enumerate report identifiers and download full report contents, including query results and embedded data source credentials.
Affected context
This vulnerability occurs in JimuReport deployments that expose the /jmreport/auto/export HTTP endpoint.
The handler is explicitly marked as not requiring login, causing the JimuReportTokenInterceptor to bypass authentication and authorization checks.
In environments where report IDs are predictable or discoverable, and reports connect to backend databases or third-party services, the endpoint can be used to retrieve rendered report data and configuration details without any user verification.
Exploit preconditions
- Attack surface: Public or internal HTTP interface exposing
/jmreport/auto/export. - Required access: Network access to the JimuReport server; no valid account or token is needed.
- Trigger point: Sending a POST request to the auto-export endpoint with a chosen report identifier.
- Why exploitation is possible: The controller is annotated to skip login, and the export service does not validate the auto-export configuration flag or enforce per-report access control, so the system trusts any caller to receive the rendered report.
Why this happens
The underlying issue is a missing authentication and authorization check on a sensitive endpoint.
By annotating the export handler with a "no login required" marker and routing it through an interceptor that relies on this annotation, the design effectively designates a data-rich operation as public.
This maps to CWE-306: Missing Authentication for Critical Function, where a function that exposes sensitive information or performs privileged operations is callable without verifying the caller's identity or access rights.
Potential impact
- Unauthorized retrieval of full report contents, including SQL query results.
- Exposure of sensitive business data and analytics derived from backend data sources.
- Disclosure of embedded credentials or connection strings stored in report configurations.
- Facilitation of further database compromise using leaked credentials and connection details.
- Regulatory or compliance violations due to inadvertent leakage of protected data.
General mitigation guidance
A robust mitigation strategy focuses on enforcing strong access control around reporting and export operations.
Common defensive patterns include:
- Requiring authenticated sessions or tokens for all report export endpoints.
- Applying fine-grained authorization checks based on report ownership, roles, or explicit sharing rules.
- Treating any function that returns rendered report data or configuration as sensitive by default, and avoiding "no login" annotations for such endpoints.
- Separating internal service APIs from public interfaces and restricting exposure with network controls.
- Designing report configuration storage so that credentials and secrets are managed by dedicated secret stores, not embedded directly in report metadata.
How teams detect issues like this
Organizations can detect similar issues through a combination of architectural review and automated checks:
- Reviewing controller and route annotations for patterns that explicitly bypass authentication on sensitive endpoints.
- Using static analysis or custom lint rules to flag handlers that perform data export, query execution, or configuration retrieval without preceding auth checks.
- Implementing API gateway or reverse proxy policies that enforce authentication for entire URI patterns, reducing reliance on per-handler annotations.
- Periodic security testing and endpoint enumeration to identify unauthenticated access to high-value functions such as reporting, data export, and administration.

