/

CVE-2026-54670

Severity:

CRITICAL RISK

(9.1)

Path Traversal (CWE-22) in WeGIA Contribution Controller

CVE-2026-54670

Deferred

Vulnerability type

Category:

Path Traversal and Missing Authentication

CWE:

CWE-22, CWE-306

Impact:

Unauthorized data disclosure, financial workflow manipulation, and potential server-side code execution

Severity:

CRITICAL RISK

(9.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

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 nomeClasse and metodo values
  • 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

Sources

SourceLink
github.comgithub.com/LabRedesCefetRJ/WeGIA/commit/8d451b3f57805e90c4af93decb341531b803a4e9
github.comgithub.com/LabRedesCefetRJ/WeGIA/commit/ba22e0ccbf5e499d9d45b7b0d1fcbc153269971d
github.comgithub.com/LabRedesCefetRJ/WeGIA/issues/1638
github.comgithub.com/LabRedesCefetRJ/WeGIA/releases/tag/3.8.5
github.comgithub.com/LabRedesCefetRJ/WeGIA/security/advisories/GHSA-7p5g-g8xw-x47g

Frequently asked

questions

Yes. The affected dispatcher is reachable through web requests, and the described sensitive operations may be invoked without authentication when deployment and routing conditions expose the vulnerable paths.

The primary condition is network access to the contribution request dispatcher. Valid credentials may not be necessary if the affected operations remain exempt from authentication.

Use explicit server-side route and handler mappings, require authentication and authorization for each sensitive operation, and ensure any file path is canonicalized and confined to an approved directory.

Treat request parameters as untrusted, avoid dynamic file inclusion, enforce complete allowlists, test authorization boundaries, and apply least-privilege permissions to application files and data.

Find out what's already
exploitable in your codebase.