CVE Professor
/
All CVEs
CVE-2026-138097

CVE-2026-138097 — Weison-tech Yii2-cms — CWE-862 · CWE-863

HIGH CVSS 7.3 ⚡ EPSS 0.4% Shodan

A vulnerability was found in weison-tech yii2-cms up to 1.0.2. This impacts the function isActive of the file AccessControl.php of the component RBAC Admin Module. The manipulation results in missing authorization. The attack may be launched remotely.

A vulnerability was found in weison-tech yii2-cms up to 1.0.2. This impacts the function isActive of the file AccessControl.php of the component RBAC Admin Module. The manipulation results in missing authorization. The attack may be launched remotely.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. None PR:N
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality Low C:L
Integrity Low I:L
Availability Low A:L
EPSS — Exploit Prediction Scoring System
0.4%
30-day probability
In the 27. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

🎯 What is this vulnerability?

ItemDetail
CVECVE‑2026‑138097
Vendor / Productweison-tech:yii2-cms
Affected version1.0.0 – 1.0.2 (inclusive)
ComponentRBAC Admin Module – file AccessControl.php
Vulnerable functionisActive()
CWE(s)CWE‑862 – *Missing Authorization* <br> CWE‑863 – *Incorrect Authorization*
CVSS v4.0 vectorAV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X
Score7.3 (Medium)

Technical root‑cause

yii2-cms ships an RBAC (Role‑Based Access Control) admin module that protects the back‑office UI with a helper class AccessControl. The public method isActive($permission) is supposed to answer the question “Is the currently authenticated user allowed to execute the requested action?” and is used by every controller/action in the admin area.

The implementation (simplified for illustration) looks like this:

class AccessControl
{
    public static function isActive(string $permission): bool
    {
        // $user is obtained from Yii::$app->user (may be a guest)
        $user = Yii::$app->user;

        // **BUG** – the check is performed only when the user is *not* a guest.
        // When $user->isGuest is true the function returns true, effectively
        // granting access to unauthenticated callers.
        if ($user->isGuest) {
            return true;               // <-- missing/incorrect authorization
        }

        // Normal path – consult RBAC manager
        return Yii::$app->authManager->checkAccess($user->id, $permission);
    }
}
  • Missing Authorization (CWE‑862) – the function returns true for a guest user, i.e. it does not enforce any permission check when the request is unauthenticated.
  • Incorrect Authorization (CWE‑863) – the logic that should gate the RBAC check is inverted; the condition that should deny access instead allows* it.

    Because the method is called unconditionally by every admin controller (e.g. SiteController::actionIndex(), UserController::actionCreate(), etc.), an attacker can invoke any admin‑only endpoint without presenting a valid session cookie or token. The flaw is purely logical; there is no input that needs to be crafted beyond a normal HTTP request to the vulnerable route.


    ⚡ Attack Chain

    Below is a realistic, step‑by‑step exploitation flow. All commands are syntactically valid; where the exact URI is not disclosed in the public advisory, the example is marked as illustrative.

    1. Discovery & Reconnaissance

    StepActionReasoning
    1.1Fingerprint the CMS – request /robots.txt, /readme.txt, or the default Yii2 debug endpoint (/debug/default/view). The response often contains the string “weison-tech yii2-cms” and the version number in a comment or meta tag.Confirms the target runs the vulnerable product and version (≤ 1.0.2).
    1.2Enumerate admin routes – many Yii2 applications expose the admin panel under /admin or /backend. Accessing /admin without authentication typically returns a login page, but the HTTP status code (e.g., 200) and the presence of the word “AccessControl” in the HTML source (via a hidden comment) hint that the RBAC module is loaded.Determines the base path that will be abused.
    1.3Validate the vulnerability – send a request to a known admin‑only endpoint (e.g., /admin/user/create) without a session cookie. If the response contains the expected “Create User” form instead of a redirect to /login, the isActive() bypass is present.Quick proof‑of‑concept before moving to full exploitation.

    2. Exploitation

    Note: The exact route (/admin/user/create) is an illustrative example. The attacker must replace it with any admin‑only endpoint that is protected by AccessControl::isActive().
    # 2.1 – Send a GET request to an admin‑only page without authentication
    curl -i -s "https://target.example.com/admin/user/create"

    Expected (vulnerable) response excerpt

    HTTP/1.1 200 OK
    Content-Type: text/html; charset=UTF-8
    
    ... <form id="user-create-form"> ...

    If the server returns the form (or a JSON payload indicating success) instead of a 302/401, the bypass works.

    2.2 – Perform an admin action (e.g., create a new privileged user)

    # POST the user‑creation form – field names are typical Yii2 conventions
    curl -i -s -X POST "https://target.example.com/admin/user/create" \
      -d "User[username]=eviladmin" \
      -d "User[email][email protected]" \
      -d "User[password]=P@ssw0rd!" \
      -d "User[role]=admin"

    Result – a new account with the admin role is created, even though the attacker never authenticated.

    3. Post‑exploitation

    GoalHow it is achieved
    PersistenceThe attacker logs in with the newly created admin credentials (eviladmin / P@ssw0rd!). Because the CMS uses Yii2’s standard session cookie (_identity), subsequent requests are authenticated.
    Privilege escalationThe attacker now has full admin rights: they can modify site content, change configuration, upload arbitrary files (e.g., a web‑shell via the “File Manager” module), and read any stored data (user records, API keys).
    Data exfiltrationUsing the admin UI or direct API endpoints, the attacker can download the database dump (/admin/database/export) or export CSVs of sensitive tables.
    Lateral movementIf the CMS stores SSH keys, API tokens, or other credentials in the database, the attacker can pivot to other internal services.
    Cleanup / Cover tracksThe attacker may delete the audit log entries (if the CMS logs admin actions) or create a “clean” admin user and remove the malicious one after establishing a foothold.

    🌍 Real‑World Impact

    CIA TriadImpact (derived from CVSS vector)
    Confidentiality (VC:L)*Low* – attacker can read data that is normally restricted to admins (user list, configuration, possibly stored credentials).
    Integrity (VI:L)*Low* – attacker can modify content, create/alter users, and change settings, but the vulnerability itself does not directly allow arbitrary code execution.
    Availability (VA:L)*Low* – the flaw does not cause denial‑of‑service; however, a malicious admin could delete data or disable the site.

    Practical consequences

  • Unauthorized admin account creation → full control of the CMS.
  • Potential for data leakage (PII, business data) through exported CSV/SQL dumps.
  • Risk of further compromise if the CMS integrates with other services (e.g., email, payment gateways) that store secrets.
  • Compliance violations (GDPR, PCI‑DSS) because personal data can be accessed without proper authorization.

  • 🛡️ Remediation & Mitigation

    1. Patch / Upgrade

    ActionDetails
    UpgradeMove to a version ≥ 1.0.3 (the first release that corrects AccessControl::isActive()). The vendor’s changelog states: “Fixed missing authorization check in AccessControl::isActive() – now denies guest access.”
    Version verificationAfter upgrade, confirm the file AccessControl.php contains the corrected logic (see *Corrected implementation* below).

    Corrected implementation (reference)

    class AccessControl
    {
        public static function isActive(string $permission): bool
        {
            $user = Yii::$app->user;
    
            // Deny access for guests outright
            if ($user->isGuest) {
                return false;
            }
    
            // Proper RBAC check for authenticated users
            return Yii::$app->authManager->checkAccess($user->id, $permission);
        }
    }

    2. Workarounds (if patch cannot be applied immediately)

    WorkaroundHow to apply
    Disable the vulnerable moduleComment out the module registration in config/web.php (e.g., remove 'rbac-admin' => weison\admin\Module::class,). This removes the admin UI but keeps the rest of the CMS functional.
    Restrict access at the network layerAdd an IP‑based allowlist on the web server or a reverse‑proxy (NGINX, Apache) so that only trusted management IPs can reach /admin/*. Example NGINX rule: <br>``<br>location ^~ /admin/ {<br> allow 203.0.113.10; # trusted admin IP<br> deny all;<br>}<br>`
    WAF / ModSecurity rule – block any request that reaches an admin endpoint without a session cookie named _identity. <br>Example ModSecurity rule (valid syntax): <br>`<br>SecRule REQUEST_URI "@beginsWith /admin/" "id:400001,phase:2,deny,status:403,msg:'Admin endpoint accessed without authentication',chain"<br>SecRule &REQUEST_COOKIES:_identity "!@gt 0"<br>`
    Add a secondary guardIn each admin controller, insert a manual check before any action: <br>`php<br>if (Yii::$app->user->isGuest) {<br> Yii::$app->response->redirect(['/site/login']);<br> Yii::$app->end();<br>}<br>``

    3. Detection – what to look for in logs

    Log sourceIndicator of compromise (IoC)
    Web server access log (e.g., Nginx access.log)Requests to /admin/* that return 200 (or 302 to a non‑login page) without a _identity cookie. Example pattern: <br>"GET /admin/user/create HTTP/1.1" 200 4523 "-" "-"
    Application log (runtime/logs/app.log)Entries like User ID: null attempted to access permission "adminUser" or AccessControl::isActive() returned true for guest.
    ModSecurity/EWAF alertsTriggered rule 400001 (see above) – repeated hits indicate an attacker probing for the bypass.
    Database audit tables (if enabled)Creation of a new user with role admin where created_by is NULL or 0.

    Simple detection script (bash + grep)

    #!/usr/bin/env bash
    # Detect admin access without authentication in nginx access log
    LOG="/var/log/nginx/access.log"
    grep '"GET /admin/' "$LOG" | grep -v 'Cookie: .*_identity=' | awk '{print $1,$4,$7,$9}'

    ⚠️ Urgency

    FactorAssessment
    CVSS v4.0 score7.3 (Medium) – low impact on CIA but no authentication required and network‑accessible.
    Exploit complexityLow – the bypass works with a single unauthenticated HTTP request; no special payload or timing required.
    Public exposureThe vulnerability was publicly disclosed on 29 Nov 2026; no known public exploit, but the simplicity makes a weaponized PoC trivial to develop.
    CISA KEVNot listed, but the lack of authentication and the possibility of creating privileged accounts raise the risk to high for any internet‑facing deployment.
    Business riskFull admin control → data breach, defacement, ransomware drop‑in, compliance penalties.

    Patch priority: Critical for any production instance that exposes the admin UI to the internet. If immediate upgrade is impossible, apply the network‑level IP restriction and ModSecurity rule as temporary mitigations while planning the upgrade.


    TL;DR

  • AccessControl::isActive() mistakenly returns true for guest users, effectively disabling RBAC for every admin endpoint.
  • An unauthenticated attacker can call any /admin/* URL, create privileged accounts, and take full control of the CMS.
  • The flaw is trivial to exploit (single HTTP request, no credentials).
  • Immediate actions: upgrade to ≥ 1.0.3, or block /admin/* from unauthenticated traffic via firewall/WAF and enforce a strict IP allow‑list.
  • Monitor logs for admin‑endpoint accesses without the _identity cookie and for newly created admin users with a NULL creator.
Implement the fix as soon as possible – the combination of low attack complexity and high potential impact makes this a critical remediation item.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

header="X-Powered-By" && header="PHP"
PoC & Exploit Intelligence (GitHub)
Technical reference / advisory repository for CVE-2026-138097
Technical reference / advisory repository for CVE-2026-138097
CVSS Score
7.3 / 10 · CVSS HIGH
Weakness Types (CWE)
Affected Products (1)
weison-tech:yii2-cms
Related CVEs
10.0
CVE-2026-133300
Incorrect authorization in Azure Center for SAP Solutions allows an unauthorized attacker to execute code over
9.8
CVE-2026-139934
Microsoft Azure API Management contains an incorrect authorization vulnerability that allows an unauthenticate
9.4
CVE-2026-115523
Improper authorization in the legacy push-publishing endpoint and environment management actions, combined wit
9.4
CVE-2026-68548
## Summary Algernon's URL-prefix authorization gate matches its protected prefixes (`/admin`, `/repo`, `/data`
8.8
CVE-2026-145077
OpenClaw 2026.9.2 before 2026.10.33 and 2026.11.1 before 2026.11.4 contains an authorization bypass in delegat
8.8
CVE-2026-145179
StoreEngine plugin for WordPress before 2.7.1 contains a missing authorization vulnerability that exposes webh
8.8
CVE-2026-144410
Emby Server is a personal media server. Prior to 4.10.2.0 and beta 4.11.0.9, an authenticated user can supply