Summary
WeGIA contains an unauthenticated controller-dispatch vulnerability that allows remote attackers to invoke sensitive contribution-management methods without complete authorization checks. Attackers may also abuse an insufficiently constrained include path to load accessible PHP or configuration files outside the intended controller directory, potentially exposing data or triggering unintended server-side behavior.
Affected context
The issue occurs in WeGIA deployments where the contribution request dispatcher accepts client-supplied controller and method names. Risk increases when controller and method values are not restricted by complete allowlists, sensitive operations are excluded from authentication checks, and dynamically constructed include paths are not verified against a canonical controller directory.
Exploit preconditions
- Attack surface: Public web requests reaching the contribution request dispatcher
- Required access: No authentication may be required for the affected dispatcher paths
- Trigger point: Processing attacker-controlled
nomeClasseandmetodovalues - Why exploitation is possible: Incomplete authorization and allowlist checks permit sensitive controller methods to be reached, while inadequate canonical path containment may allow includes outside the intended directory
Why this happens
The vulnerability combines missing authorization enforcement with path traversal in dynamic server-side file inclusion. The dispatcher treats request-controlled controller and method identifiers as trusted routing data, rather than limiting them to explicitly approved operations and verifying authorization for each sensitive action. It also constructs an include path without reliably canonicalizing it and enforcing containment within the permitted controller directory. These behaviors map primarily to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, with CWE-306: Missing Authentication for Critical Function applying to unauthenticated sensitive operations.
Potential impact
- Attackers could disclose contribution, donation, source-code, or configuration records
- Unauthorized users could trigger financial workflow operations
- Exposed configuration files could reveal credentials or other sensitive secrets
- Maliciously selected files could cause unintended PHP execution where server conditions permit it
- The application could suffer broader compromise through exposed credentials or privileged workflow access
General mitigation guidance
Mitigation generally focuses on enforcing authorization at the operation boundary and removing trust in client-supplied dispatch parameters.
Common defensive patterns include:
- Replacing dynamic controller and method resolution with explicit, server-defined route mappings
- Applying authentication and per-operation authorization checks to every sensitive function
- Canonicalizing requested paths and enforcing strict containment within an approved directory
- Avoiding dynamic inclusion of request-influenced files where static imports or vetted mappings are practical
- Validating inputs against restrictive schemas and rejecting unexpected controller or method identifiers
- Running the application with least-privilege filesystem and database permissions
- Protecting configuration files and preventing secrets from being readable by the web process
How teams detect issues like this
Organizations can look for this class of issue through:
- Static analysis rules identifying
require,include, or equivalent calls that use request-derived values - Code review checks for controller or method dispatch based directly on query or form parameters
- Tests that verify authentication and authorization for every sensitive controller action
- Policy checks requiring explicit route and handler allowlists
- Runtime monitoring for unusual unauthenticated requests to contribution-management endpoints
- File-access telemetry showing web-process reads outside approved application directories
- Automated security review tools that flag path traversal and missing-authentication patterns

