Summary
A critical access control vulnerability in Reportico-Web allows unauthenticated attackers to inject arbitrary PHP code into the PreExecuteCode attribute of reports. Because the code can be processed regardless of the configured safe_mode setting, successful exploitation may result in remote code execution on the application server.
Affected context
The vulnerability occurs in Reportico-Web report handling when an attacker can reach report-management or report-processing functionality without authentication. It becomes risky where the application accepts attacker-controlled values for the PreExecuteCode attribute and does not enforce authorization or constrain executable report logic.
Exploit preconditions
- Attack surface: Reportico-Web report creation, modification, or execution functionality
- Required access: No authentication may be required when the affected functionality is exposed
- Trigger point: Processing a report containing attacker-controlled PreExecuteCode content
- Why exploitation is possible: Insufficient access control permits untrusted users to modify a code-bearing report attribute, and the configured safe_mode setting does not prevent the resulting code execution
Why this happens
The underlying flaw is an authorization failure in which report functionality that can contain executable PHP logic is accessible without adequate identity and permission checks. This maps to CWE-284: Improper Access Control, because the application does not correctly restrict a sensitive operation to authorized principals. Treating a code-bearing report attribute as user-controllable without strong trust-boundary enforcement creates a path from unauthenticated input to server-side execution.
Potential impact
- An attacker may execute arbitrary PHP code on the application server
- The application and its service account could be compromised
- Sensitive reports, configuration, or connected data sources could be accessed
- The server could be used for persistence, lateral movement, or additional attacks
- Data could be modified, deleted, or exfiltrated
General mitigation guidance
Mitigation generally focuses on enforcing authorization before any report attribute can be created, changed, or executed.
Common defensive patterns include:
- Requiring authenticated, explicitly authorized users for report management and execution
- Removing executable report attributes where they are not essential
- Treating report definitions and code-bearing fields as trusted administrative content rather than ordinary user input
- Applying strict allowlists and schema validation to report properties
- Running the application with least-privilege operating-system and database permissions
- Isolating report execution from sensitive services and data where possible
- Avoiding reliance on runtime settings such as safe_mode as the primary security boundary
How teams detect issues like this
Detection approaches may include:
- Static analysis for report attributes or request parameters that flow into PHP evaluation or execution APIs
- Code review checks for missing authorization around report creation, update, import, and execution paths
- Dynamic testing of report endpoints with unauthenticated and low-privilege sessions
- Web application firewall or gateway policies that restrict unauthenticated access to report-management routes
- Audit logging and alerting for unexpected report-definition changes or code-bearing attribute usage
- Automated security review tools that identify missing authorization checks and server-side code execution sinks

