/

CVE-2026-69187

Severity:

HIGH RISK

(8.8)

Broken Authorization (CWE-863) in WeGIA Permission Control

CVE-2026-69187

Deferred

Vulnerability type

Category:

Broken Authorization

CWE:

CWE-266, CWE-863

Impact:

Privilege Escalation and Unauthorized Permission Changes

Severity:

HIGH RISK

(8.8)

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 has an authorization flaw in permission-management requests: the access check does not verify the requested action or method. An authenticated employee with a qualifying permission and a valid CSRF token from their own session may change permissions for arbitrary roles, potentially gaining elevated access or disrupting other users.

Affected context

The issue affects WeGIA's FuncionarioControle permission-management operations in web/controle/control.php. The risk arises when an authenticated employee has a permission row for resource 11 or 91, but the authorization check does not validate the stored action level or whether that permission covers the requested method. The issue is described as affecting versions before 3.9.1.

Exploit preconditions

  • Attack surface: Authenticated web requests to employee permission-management operations
  • Required access: An employee account with a permission row for resource 11 or 91, plus a valid CSRF token from that employee's session
  • Trigger point: A request invoking adicionarPermissao, alterarPermissao, or excluirPermissao
  • Why exploitation is possible: The permission check does not compare the stored id_acao value or authorize the specific requested method, allowing the request to affect permissions for arbitrary roles

Why this happens

The root cause is an authorization decision based on an insufficient permission check. MiddlewareDAO::verificarPermissao() checks for a permission row associated with a resource but does not confirm that the row grants the required action or that the requested method is authorized. This is an incorrect authorization condition (CWE-863) and can result in incorrect privilege assignment (CWE-266).

Potential impact

  • An attacker may grant higher action levels over sensitive resources to a role they choose.
  • Protected employee, patient, configuration, or administrative data could be exposed or modified by accounts in an affected role.
  • An attacker could remove permissions from other roles and disrupt legitimate access.

General mitigation guidance

Common defensive patterns include:

  • Authorize each operation against the specific resource, action level, and method being requested.
  • Deny access by default when a permission is missing, ambiguous, or does not match the requested action.
  • Centralize permission checks so controller methods cannot bypass or weaken policy enforcement.
  • Reduce reliance on mutable permission data and tightly restrict who can change role assignments.
  • Apply least privilege to employee roles and regularly review permission changes.
  • Treat CSRF protection as a complementary control; it does not replace authorization checks.

How teams detect issues like this

  • Use static analysis and code review to identify permission checks that verify resource access but omit action-level or method-specific authorization.
  • Review controller routes and permission-management methods for consistent, deny-by-default authorization.
  • Audit permission-change events, looking for unexpected role targets, elevated action levels, or removals affecting multiple users.
  • Enforce policy checks in automated tests and deployment review processes; automated code review tools may help flag incomplete authorization patterns.

Sources

SourceLink
github.comgithub.com/LabRedesCefetRJ/WeGIA/commit/9fb18f330ea31b240713812010690418cb3d0eed
github.comgithub.com/LabRedesCefetRJ/WeGIA/pull/1892
github.comgithub.com/LabRedesCefetRJ/WeGIA/releases/tag/3.9.0
github.comgithub.com/LabRedesCefetRJ/WeGIA/security/advisories/GHSA-27h8-4v64-8v85

Frequently asked

questions

An authenticated employee whose account has a permission row for resource 11 or 91 may be able to invoke the affected operations, provided they have a valid CSRF token from their session.

No. A CSRF token helps establish that a request came from the user's session, but the application must still verify that the user is authorized to perform the requested action.

Check authorization for the exact resource, action level, and method on every permission-management operation, and deny access when the required permission is not explicitly granted.

Centralize and test authorization policies, review role changes with least-privilege principles, and monitor permission changes for unexpected activity.

Find out what's already
exploitable in your codebase.