Summary
WeGIA contains an authorization and password-verification flaw in its password change flow. An authenticated user may change an account password without providing the existing password, which could turn temporary or limited session access into permanent account takeover.
Affected context
The vulnerability occurs in WeGIA password-management workflows where requests are routed through controle/control.php. It affects deployments using a flow that excludes the alterarSenha method from normal permission checks and permits user-controlled redirection to alterar_senha.php. In affected releases, the alternate route may invoke configuration verification instead of validating the current account password.
Exploit preconditions
- Attack surface: The authenticated web application password-change endpoint
- Required access: An authenticated user session; elevated privileges may not be required
- Trigger point: A password-change request that influences the
redirrouting parameter - Why exploitation is possible: The target method is unconditionally excluded from permission checks, allowing a route that does not require verification of the existing password
Why this happens
The underlying bug is an authorization and authentication-context failure in a sensitive credential-change operation. The application treats a password-change method as exempt from normal authorization checks and allows request-controlled routing to select a verification path that does not confirm the current password. This maps primarily to CWE-620: Unverified Password Change, with CWE-862: Missing Authorization also describing the failure to enforce access control consistently.
Potential impact
- An authenticated user could change a victim account's password
- Existing users could be locked out of their accounts
- An attacker could obtain persistent access to a compromised account
- Administrative or sensitive accounts could be taken over if reachable through the affected flow
- Account recovery and audit processes could be disrupted
General mitigation guidance
Mitigation generally focuses on making password changes an explicitly authorized and consistently verified operation.
Common defensive patterns include:
- Require verification of the current credential, or an equivalent strong reauthentication factor, for every password-change path
- Apply authorization checks to the operation itself rather than relying on controller or method-name exclusions
- Avoid allowing user-controlled routing parameters to select security-sensitive verification flows
- Use server-side allowlists for permitted destinations and password-management actions
- Separate temporary session capabilities from permanent credential-management privileges
- Apply least privilege and require stronger controls for administrative account changes
- Invalidate relevant sessions and recovery tokens after a successful credential change where appropriate
How teams detect issues like this
Organizations can identify similar issues through:
- Static analysis rules for password-change handlers that lack current-password or reauthentication checks
- Code review checks for unconditional authorization exclusions and request-controlled dispatch
- Tests that exercise every password-change route with missing, invalid, and expired credentials
- Policy enforcement requiring explicit authorization annotations for credential-management operations
- Monitoring for password changes that occur without recent reauthentication or that target unusual accounts
- Automated application security testing focused on alternate routes, redirect parameters, and session privilege transitions

