/

CVE-2026-34570

Severity:

HIGH RISK

(8.8)

Broken Access Control / Session Management in CI4MS CMS

CVE-2026-34570

Modified

Vulnerability type

Category:

Broken Access Control / Session Management

CWE:

CWE-284, CWE-613, CWE-1254

Impact:

Persistent Unauthorized Access via Non‑Expired Sessions

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

CI4MS, a CodeIgniter 4-based CMS skeleton, contains a logic flaw where user account state changes (such as deletion) are not enforced for already-active sessions.

As a result, deleted accounts can continue to access protected resources indefinitely until they manually log out, violating the intended access control policy and enabling persistent unauthorized access.

Affected context

This weakness appears in CI4MS deployments that rely on its built-in authentication, RBAC authorization, and session handling.

The application only validates account state during login and does not re-check user status or revoke sessions when an account is deleted or disabled.

There is no configured session or account expiration mechanism, so long-lived sessions remain valid even after administrative account deletion.

This typically affects scenarios where administrators revoke user access (e.g., termination, role changes, incident response) and expect immediate loss of access.

Exploit preconditions

  • Attack surface: Web application session layer exposed through the CI4MS authentication system.
  • Required access: A valid user account and an already-established authenticated session (e.g., browser session, remembered login).
  • Trigger point: An administrator deletes or deactivates the user account, expecting that access is revoked.
  • Why exploitation is possible: Session validity is not tied to dynamic account state checks; the application trusts existing sessions for their entire lifetime and does not implement explicit session expiration, revocation, or revalidation on critical requests.

Why this happens

The core issue is a broken access control and session lifecycle design, aligning with:

  • CWE-613: Insufficient Session Expiration, where sessions are allowed to persist beyond changes in authorization.
  • CWE-284: Improper Access Control, since access rights are not re-evaluated after account deletion.
  • CWE-1254: Improper Access Control for Impersonation or Confused Deputy patterns, in that the system continues to honor stale credentials as though they reflected current policy.

Architecturally, the application couples authorization decisions to the moment of authentication, assuming that once a user is logged in, their session token remains trustworthy without further state verification.

There is no mechanism to invalidate or rotate sessions based on account changes, nor to enforce time-based expiration, producing a long-lived, over-privileged session model.

Potential impact

  • Deleted user accounts may continue accessing protected areas of the CMS indefinitely.
  • Users whose access should be revoked (e.g., former employees, banned community members) could retain the same permissions they had before deletion.
  • Administrative or elevated accounts, if not properly revoked at the session layer, could continue performing privileged actions despite removal in the backend.
  • Incident response and access revocation procedures may be ineffective, undermining organizational security policies and compliance requirements.
  • Lateral movement and data exfiltration can be facilitated if stale sessions are reused from multiple devices or browsers.

General mitigation guidance

Mitigation focuses on decoupling trust from static sessions and enforcing continuous authorization:

  • Design the session model so that session validity is checked against the current user state (e.g., active/disabled/deleted) on each privileged request or at regular intervals.
  • Introduce robust session expiration policies, including reasonable session lifetimes and absolute timeouts, to limit the duration of any granted access.
  • Implement server-side session revocation: when an account is deleted or disabled, invalidate associated sessions stored in the server-side session store or database.
  • Use versioned or state-bound tokens (e.g., a user record with a token_version or session_salt field) so that updating this value on account changes automatically invalidates all existing sessions.
  • Apply least-privilege principles by separating high-privilege actions behind additional checks (such as re-authentication or fresh token claims) to reduce the risk of stale sessions performing sensitive operations.
  • Incorporate access control checks into middleware or filters that run on every request to critical endpoints, not just at login time.

How teams detect issues like this

Detecting this class of issue generally involves a combination of design review, code inspection, and runtime monitoring:

  • Code review patterns:
  • Verify whether authorization checks are centralized (e.g., middleware) and performed on each request, rather than only during login.
  • Inspect session handling and authentication logic to see if account state (active/deleted/locked) is consulted at request time.
  • Look for missing or overly long session timeout settings and absence of server-side session invalidation on account changes.
  • Static analysis & policy checks:
  • Use static analysis or custom linters to flag authentication flows that do not reference current user status when authorizing actions.
  • Implement architectural review rules that require a clear session revocation mechanism tied to user lifecycle events (deletion, role change, password reset).
  • Runtime and log-based indicators:
  • Monitor logs for activity by user identifiers after they have been deleted or deactivated.
  • Analyze session tables or tokens for unusually long-lived sessions that do not expire or rotate.
  • Automated test strategies:
  • Add regression tests that simulate deleting a user while an active session exists and verify that subsequent requests using that session are rejected.
  • Integrate these tests into CI to ensure that future changes do not reintroduce persistent session issues.

Sources

SourceLink
github.comgithub.com/ci4-cms-erp/ci4ms/releases/tag/0.31.0.0
github.comgithub.com/ci4-cms-erp/ci4ms/security/advisories/GHSA-4vxv-4xq4-p84h

Frequently asked

questions

Any user who is logged in at the time their account is deleted or should otherwise be revoked can continue to use the application via their existing session. The scope includes all roles supported by CI4MS, and the impact scales with the privileges associated to those roles.

The attacker only needs a valid account and an active session that was established before the account was deleted or disabled. No additional privilege escalation is required; they simply keep using their existing session while backend administrators believe access has been revoked.

Implement server-side session revocation and continuous authorization. That typically means checking user state on each request (or at least on each privileged operation), introducing robust session timeouts, and invalidating or rotating sessions whenever account properties change (deletion, lockout, role modification, or password resets).

Treat authentication as a point-in-time credential issuance and authorization as a continuous process. Architect the system so that access control decisions always rely on current user state, centralize these checks in middleware or a dedicated authorization layer, implement clear session lifecycle policies (creation, renewal, expiration, revocation), and enforce them with automated tests and code review guidelines.

Find out what's already
exploitable in your codebase.