CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-62955

CVE-2026-62955: Authenticated Path Traversal and Remote Code Execution via realpath() Bypass in baserCMS BcThemeFileService

Amit Schendel
Amit Schendel
Senior Security Researcher

Nov 20, 2026·11 min read·3 visits

Executive Summary (TL;DR)

An incomplete patch for CVE-2026-30940 in baserCMS (versions 5.2.3 to < 5.3.0) allows authenticated administrators to bypass directory containment checks in BcThemeFileService::getFullpath(). By requesting an asset or template subdirectory that does not exist on disk, realpath() returns false and skips path validation, enabling arbitrary file operations and remote code execution.

CVE-2026-62955 is an authenticated path traversal vulnerability in baserCMS affecting versions 5.2.3 up to, but not including, 5.3.0. The flaw resides in the BcThemeFileService::getFullpath() method within the bc-theme-file plugin and represents an incomplete remediation of CVE-2026-30940. Because the path containment check relies on PHP's realpath() returning a non-false value, supplying a nonexistent theme subdirectory causes the verification guard to be skipped entirely. An authenticated administrator can exploit this flaw to read, write, overwrite, or delete arbitrary files within the permissions of the PHP process, leading to remote code execution when executable PHP files are written to the webroot.

Vulnerability Overview

baserCMS is an open-source website development framework and content management system built on top of the CakePHP framework. Within its core architecture, the bc-theme-file plugin (baserproject/bc-theme-file) exposes administrative interfaces and REST API endpoints for managing theme templates, stylesheets, JavaScript files, and image assets directly from the control panel. The central path resolution mechanism for these operations is handled by BcThemeFileService::getFullpath() in plugins/bc-theme-file/src/Service/BcThemeFileService.php.

In baserCMS version 5.2.3, developers introduced a security patch for CVE-2026-30940 to prevent directory traversal attacks within theme management workflows. This fix implemented a directory containment check using PHP's realpath() function to verify that any target file path remained strictly underneath the intended theme base directory. However, the containment validation logic was enclosed within a conditional block that only executed if realpath($baseDir) evaluated to a truthy string value (if ($resolvedBase !== false)).

CVE-2026-62955 (also tracked as GHSA-2pj4-v76f-wjvx) arises because this conditional guard fails open when the base subdirectory does not exist on the underlying filesystem. Classified under CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) and CWE-693 (Protection Mechanism Failure), the flaw allows an authenticated user with administrative privileges to bypass path validation entirely.

By selecting an absent theme asset directory (such as js or img on a theme that only distributes css files) and supplying relative traversal sequences (../), an attacker can escape the theme directory boundary. When chained with file creation, modification, or deletion sinks in the theme file management API, this vulnerability permits arbitrary file manipulation and remote code execution within the context of the web server process.

Root Cause Analysis

The primary root cause of CVE-2026-62955 is an improper reliance on PHP's realpath() behavior when handling nonexistent filesystem paths. In PHP, realpath() expands all symbolic links, resolves relative path references (/./, /../), and returns the canonicalized absolute pathname. Critically, realpath() requires that the target file or directory physically exist on disk; if any component of the path does not exist, the function returns boolean false.

In BcThemeFileService::getFullpath(), the application constructs $baseDir by concatenating the resolved theme view or webroot path with the user-supplied $type parameter (for example, /var/www/html/plugins/BcThemeSample/webroot/js/). It then constructs $fullPath by appending the user-supplied $path parameter to $baseDir. To verify containment, the method calls $resolvedBase = realpath($baseDir) and checks if ($resolvedBase !== false) before comparing the normalized target directory prefix against $resolvedBase.

In many standard baserCMS themes, not every asset or template subdirectory is populated on disk. For example, a theme may include a webroot/css/ folder but omit webroot/js/ or webroot/img/. When an attacker specifies type=js for such a theme, $baseDir references a nonexistent directory, causing realpath($baseDir) to return false. The conditional block is bypassed, and getFullpath() returns the raw, unvalidated $fullPath string containing ../ sequences directly to the calling service.

In addition to the fail-open realpath() check, the version 5.2.3 codebase contained two secondary architectural weaknesses in the same component. First, getFullpath() did not validate the $type parameter against an allowlist of known asset or template categories. When $type did not match css, js, or img, the code fell into the else branch and appended $type directly to Plugin::templatePath($theme). An attacker could inject traversal sequences into $type itself (e.g., type=../../../../tmp) to redirect $baseDir to an existing directory outside the theme root, causing realpath($baseDir) to succeed against an attacker-controlled base directory.

Second, several administrative web controller actions in ThemeFilesService (create, update, delete, copy, upload) and ThemeFoldersService accepted a fullpath parameter directly from incoming HTTP POST requests. Rather than resolving paths exclusively through BcThemeFileService::getFullpath(), these sink methods operated directly on the user-provided fullpath value, providing an independent vector to bypass path containment enforcement.

Code Analysis

Examining plugins/bc-theme-file/src/Service/BcThemeFileService.php in baserCMS 5.2.3 illustrates how the incomplete fix for CVE-2026-30940 (introduced in commit 4cab078c93054f55d8fb36990a7ec7550f443932) fails when handling absent directories:

// Vulnerable implementation in baserCMS 5.2.3
public function getFullpath(string $theme, string $plugin, string $type, string $path)
{
    $assets = [
        'css',
        'js',
        'img'
    ];
    // 1. $type is checked against $assets, but arbitrary values fall through to the else branch
    if (in_array($type, $assets)) {
        $viewPath = Plugin::path($theme) . 'webroot' . DS;
    } else {
        $viewPath = Plugin::templatePath($theme);
    }
    if ($plugin && $type !== 'etc' && !in_array($type, $assets)) {
        $viewPath .= 'Plugin' . DS . $plugin . DS;
    }
    if ($type !== 'etc') {
        $baseDir = $viewPath . $type . DS;
    } else {
        $baseDir = $viewPath;
    }
    $path = ltrim($path, '/\\');
    $fullPath = $baseDir . $path;
 
    // 2. VULNERABILITY: realpath() returns false if $baseDir does not exist on disk
    $resolvedBase = realpath($baseDir);
    if ($resolvedBase !== false) {
        $resolvedBase = rtrim($resolvedBase, DS) . DS;
        $targetDir = realpath(dirname($fullPath));
        if ($targetDir === false) {
            $targetDir = $this->normalizePath(dirname($fullPath));
        }
        if (!str_starts_with(rtrim($targetDir, DS) . DS, $resolvedBase)) {
            throw new BcException(__d('baser_core', 'パスにテーマディレクトリ外への参照が含まれています。'));
        }
    }
 
    // 3. Returns unvalidated $fullPath when $resolvedBase === false
    return $fullPath;
}

In version 5.3.0 (patched across commits 464227b8770704076ee6eddd4bd464c184786eca, c650017acf5dfbfd15eb2f3eda07967bcb002be2, and a8f90096f13eca576a87cb25aa02e8f54642af7e), the developers refactored getFullpath() and added defense-in-depth protections across the file and folder management services:

// Patched implementation in baserCMS 5.3.0
public function getFullpath(string $theme, string $plugin, string $type, string $path)
{
    // 1. Strict allowlist check on $type prevents base directory manipulation
    if (!BcThemeFileUtil::getTemplateTypeName($type)) {
        throw new BcException(__d('baser_core', 'テンプレートタイプが不正です。'));
    }
    $assets = [
        'css',
        'js',
        'img'
    ];
    if (in_array($type, $assets)) {
        $viewPath = Plugin::path($theme) . 'webroot' . DS;
    } else {
        $viewPath = Plugin::templatePath($theme);
    }
    if ($plugin && $type !== 'etc' && !in_array($type, $assets)) {
        $viewPath .= 'Plugin' . DS . $plugin . DS;
    }
    if ($type !== 'etc') {
        $baseDir = $viewPath . $type . DS;
    } else {
        $baseDir = $viewPath;
    }
    $path = ltrim($path, '/\\');
    $fullPath = $baseDir . $path;
 
    // 2. Unconditional normalization fallback when realpath($baseDir) returns false
    $resolvedBase = realpath($baseDir);
    if ($resolvedBase === false) {
        $resolvedBase = $this->normalizePath($baseDir);
    }
    $resolvedBase = rtrim($resolvedBase, DS) . DS;
 
    // 3. Evaluates $fullPath directly instead of dirname($fullPath)
    $targetDir = realpath($fullPath);
    if ($targetDir === false) {
        $targetDir = $this->normalizePath($fullPath);
    }
    if (!str_starts_with(rtrim($targetDir, DS) . DS, $resolvedBase)) {
        throw new BcException(__d('baser_core', 'パスにテーマディレクトリ外への参照が含まれています。'));
    }
 
    return $fullPath;
}

To close the secondary vector where controller endpoints passed user-supplied fullpath values directly to file operations without calling getFullpath(), the patch also introduced an explicit sink-level assertion method, assertWithinThemeDir(), inside BcThemeFileService:

protected function assertWithinThemeDir(string $path): void
{
    $resolved = realpath($path);
    if ($resolved === false) {
        $resolved = $this->normalizePath($path);
    }
    $resolved = rtrim($resolved, DS) . DS;
 
    foreach (App::path('plugins') as $root) {
        $realRoot = realpath($root);
        if ($realRoot === false) {
            $realRoot = $this->normalizePath($root);
        }
        $realRoot = rtrim($realRoot, DS) . DS;
        if (str_starts_with($resolved, $realRoot)) {
            return;
        }
    }
    throw new BcException(__d('baser_core', 'パスにテーマディレクトリ外への参照が含まれています。'));
}

This assertion is invoked across all mutating methods in ThemeFilesService and ThemeFoldersService (including create, update, delete, copy, upload, and copyToTheme). Furthermore, file upload handling was hardened by applying basename() to uploaded filenames prior to calling moveTo() and validating file extensions in ThemeFileForm.php against the regular expression /\A[0-9a-zA-Z_\-]*\z/. This multi-layered patch addresses both the realpath() fail-open flaw and the direct sink manipulation vectors.

Exploitation

Exploiting CVE-2026-62955 requires valid administrative credentials, an active administrative session, or a valid administrative JWT for the baserCMS Admin API. The target instance must be running an active theme that lacks at least one standard asset or template subdirectory on the filesystem (such as webroot/js or webroot/img). No user interaction is required.

In a standard exploitation scenario targeting the Admin API (POST /baser/api/admin/bc-theme-file/theme_files/create.json or equivalent theme file write endpoints), the attacker specifies a nonexistent subdirectory in the type parameter and provides a relative path traversal sequence in the path parameter:

POST /baser/api/admin/bc-theme-file/theme_files/create.json HTTP/1.1
Host: target.example.com
Authorization: Bearer <ADMIN_JWT_TOKEN>
Content-Type: application/json
 
{
  "theme": "BcThemeSample",
  "plugin": "",
  "type": "js",
  "path": "../../../../webroot/shell.php",
  "contents": "<?php system($_GET['cmd']); ?>"
}

When the application processes this payload on version 5.2.3, BcThemeFileService::getFullpath() constructs $baseDir as /var/www/html/plugins/BcThemeSample/webroot/js/. Because the js directory does not exist on disk, realpath($baseDir) returns false. The containment check is bypassed, and getFullpath() returns /var/www/html/plugins/BcThemeSample/webroot/js/../../../../webroot/shell.php.

> [!NOTE] > In PHP file operation functions such as file_put_contents() or stream open wrappers, resolving a path like /existing/dir/nonexistent_subdir/../file.txt depends on the underlying operating system's VFS path resolution. On POSIX filesystems (Linux), the kernel requires intermediate directory components traversed before .. to exist when opening a file path directly. However, attackers can either leverage the unvalidated $type parameter in 5.2.3 (e.g., type=../../../../var/www/html/webroot) where $baseDir resolves to an existing directory outside the theme boundary, or trigger lexical path normalization / directory creation routines within the service prior to the final write sink.

Public differential verification scripts published in the googlesky/CVE-2026-62955 repository confirm the path resolution bypass between versions 5.2.3 and 5.3.0. When submitting the payload {"type": "js", "path": "../../../pwned.php"} to the resolution harness on version 5.2.3, the service permits the request and outputs the unvalidated traversal path:

{
  "allowed": true,
  "fullpath": "/work/themes/BcTheme/webroot/js/../../../pwned.php"
}

When the exact same payload is executed against version 5.3.0, the fallback lexical normalization ($this->normalizePath($baseDir)) engages even when webroot/js does not exist on disk, throwing a BaserCore\Error\BcException (パスにテーマディレクトリ外への参照が含まれています。) and aborting the file operation before any disk modification occurs.

Impact Assessment

CVE-2026-62955 carries a CVSS v3.1 base score of 7.2 (High) with the vector CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H. Although the Privileges Required (PR:H) metric reflects the necessity of administrative authentication, the vulnerability breaks the security boundary between CMS application administration and underlying host operating system execution.

In many deployment environments, CMS administrators are granted access to manage site content and visual themes without being authorized to execute arbitrary system commands or read server-level configuration files. By exploiting this vulnerability, an attacker with compromised admin credentials or a malicious insider can achieve full Confidentiality, Integrity, and Availability impact within the privileges of the PHP worker process (typically www-data or apache).

Specifically, for Confidentiality (C:H), the attacker can read sensitive application configurations such as config/.env or config/app_local.php, exposing database credentials, JWT signing keys, and third-party API secrets. For Integrity (I:H) and Availability (A:H), the attacker can overwrite or delete core application source files, plant persistent PHP web shells in the public webroot/ directory to achieve Remote Code Execution (RCE), or delete critical system files to cause a persistent denial of service.

As of the latest threat intelligence evaluation, CVE-2026-62955 is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog and has no documented association with ransomware campaigns. However, because functional proof-of-concept and exploitation scripts (googlesky/CVE-2026-62955) are publicly available, unpatched instances remain at elevated risk of post-authentication compromise.

Remediation

The primary remediation for CVE-2026-62955 is to upgrade baserCMS and the bc-theme-file plugin to version 5.3.0 or later. Version 5.3.0 enforces strict allowlist validation on template types, implements unconditional lexical path normalization when realpath() returns false, and enforces sink-level boundary assertions (assertWithinThemeDir()) across all theme file and folder operations.

Administrators managing baserCMS installations via Composer can apply the update by executing the following commands from the project root directory:

composer update baserproject/basercms baserproject/bc-theme-file --with-dependencies
bin/cake cache clear_all

For environments where an immediate upgrade to version 5.3.0 cannot be performed, organizations should implement temporary defense-in-depth mitigations to restrict the attack surface:

  1. Restrict Administrative Permissions: Audit all user accounts and role groups under System Settings -> Permission Management. Revoke access to /baser/admin/bc-theme-file/* and /baser/api/admin/bc-theme-file/* for all non-essential administrative roles.
  2. Disable the Core Admin API: If external API integrations are not required, set USE_CORE_ADMIN_API=false in config/.env to disable JWT-authenticated administrative API endpoints.
  3. Enforce Filesystem Permissions: Configure operating system file permissions so that the web server user (www-data, nginx, or apache) has read-only access to the application root, config/, src/, and webroot/index.php, restricting write privileges strictly to tmp/, logs/, and required upload directories.
  4. Ensure Standard Theme Subdirectories Exist: Create empty css, js, and img directories inside the active theme's webroot/ folder so realpath($baseDir) does not return false, though note that upgrading to 5.3.0 is still required to remediate the unvalidated $type and direct fullpath sink vectors.

Official Patches

baserprojectOfficial GitHub Security Advisory for CVE-2026-62955 (GHSA-2pj4-v76f-wjvx)
baserprojectbaserCMS 5.3.0 Official Release Notes and Patch Distribution

Fix Analysis (3)

Technical Appendix

CVSS Score
7.2/ 10
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

Affected Systems

baserproject/basercms (>= 5.2.3, < 5.3.0)baserproject/bc-theme-file (>= 5.2.3, < 5.3.0)

Affected Versions Detail

Product
Affected Versions
Fixed Version
basercms
baserproject
>= 5.2.3, < 5.3.05.3.0
bc-theme-file
baserproject
>= 5.2.3, < 5.3.05.3.0
AttributeDetail
Vulnerability TypePath Traversal / Protection Mechanism Failure (CWE-22, CWE-693)
Affected ComponentBcThemeFileService::getFullpath() (plugins/bc-theme-file)
Attack VectorNetwork (Authenticated Admin Web UI / Admin REST API)
CVSS v3.1 Score7.2 HIGH (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H)
Security ImpactArbitrary File Read/Write/Delete and Remote Code Execution (RCE)
Exploit StatusPublic Proof-of-Concept (PoC) Available
CISA KEV StatusNot Listed
Fixed VersionbaserCMS 5.3.0

MITRE ATT&CK Mapping

T1083File and Directory Discovery
Discovery
T1005Data from Local System
Collection
T1505.003Server Software Component: Web Shell
Persistence
T1059.004Command and Scripting Interpreter: Unix Shell
Execution
CWE-22
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

Known Exploits & Detection

GitHubPublic research repository containing differential verification containers, poc/poc.py, and exploit/exploit.py demonstrating the realpath() bypass in baserCMS 5.2.3.

Vulnerability Timeline

Vendor developed and committed security patches to the 5.2.x branch (commit 464227b8770704076ee6eddd4bd464c184786eca).
2026-07-24
Security fixes merged into main basercms and bc-theme-file repositories for release 5.3.0.
2026-07-30
GitHub Security Advisory GHSA-2pj4-v76f-wjvx and CVE-2026-62955 officially published and indexed by NVD.
2026-11-19
Public proof-of-concept and differential reproduction repository released on GitHub.
2026-11-20

References & Sources

  • [1]CVE-2026-62955 Official CVE Record
  • [2]NVD Vulnerability Detail: CVE-2026-62955
  • [3]GitHub Security Advisory GHSA-2pj4-v76f-wjvx
  • [4]baserCMS 5.3.0 Release Tag
  • [5]baserCMS 5.2.x Security Backport Commit (464227b8770704076ee6eddd4bd464c184786eca)
  • [6]baserCMS Main Branch Merge Commit (c650017acf5dfbfd15eb2f3eda07967bcb002be2)
  • [7]bc-theme-file Sub-Plugin Patch Commit (a8f90096f13eca576a87cb25aa02e8f54642af7e)
  • [8]Public Research & Differential Verification Repository (googlesky/CVE-2026-62955)
Related Vulnerabilities
CVE-2026-30940

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•CVE-2026-77378
6.5

CVE-2026-77378: Authenticated SQL Injection in Bolt CMS ListFormatHelper

CVE-2026-77378 (GHSA-r7h9-qx4h-77j5) is an authenticated SQL injection vulnerability affecting the bolt/core package of Bolt CMS in versions prior to 6.1.4. The flaw resides in the ListFormatHelper utility class, where content-type slugs are dynamically interpolated into raw SQL query strings via sprintf rather than bound as parameterized inputs. When the general/caching/list_format configuration directive is enabled, an authenticated user with upload privileges can exploit the /async/select-options endpoint to inject arbitrary SQL commands and query the underlying database.

Alon Barad
Alon Barad
1 views•11 min read
•about 2 hours ago•CVE-2026-77382
5.9

CVE-2026-77382: Cryptographic Precision Loss in falcon-rust Discrete-Gaussian Sampler

A cryptographic soundness defect in the discrete-Gaussian sampler of falcon-rust prior to version 0.2.0 degrades acceptance-probability precision to approximately 2^-33. By evaluating exponential approximations using 32-bit fractional fixed-point arithmetic (FixedPoint64) and left-shifting polynomial inputs by 31 bits, the implementation violates Falcon's required precision bound of 2^-40 to 2^-46, invalidating the theoretical security reduction against statistical private key leakage.

Amit Schendel
Amit Schendel
2 views•11 min read
•about 4 hours ago•CVE-2026-63012
6.5

CVE-2026-63012: Authorization Bypass and Information Disclosure in baserCMS Administrative API

CVE-2026-63012 is an authorization bypass and information disclosure vulnerability in baserCMS versions prior to 5.3.0. An architectural flaw in the authentication service configuration combined with overly permissive API access control rules allows low-privileged operator accounts to query restricted administrative API endpoints by supplying a matching HTTP Referer header.

Alon Barad
Alon Barad
2 views•9 min read
•about 5 hours ago•CVE-2026-102945
4.9

CVE-2026-102945: Unrecovered Goroutine Panic via Malformed NGAP PathSwitchRequest in Aether Project AMF

CVE-2026-102945 is a denial-of-service vulnerability affecting the Access and Mobility Management Function (AMF) of the Aether Project (omec-project/amf) prior to version 3.1.6. When processing an NGAP PathSwitchRequest message over the 3GPP N2 interface, the HandlePathSwitchRequest function fails to verify the byte slice lengths of extensible APER bit strings inside the UESecurityCapabilities Information Element before accessing index zero. Because the NGAP receive goroutine lacks a panic recovery handler, supplying a zero-length bit string triggers an out-of-bounds slice read panic that terminates the entire AMF daemon.

Amit Schendel
Amit Schendel
1 views•11 min read
•about 6 hours ago•CVE-2026-103025
8.7

CVE-2026-103025: Unbounded Memory Allocation and Decompression Bomb in bep/imagemeta PNG Parser

CVE-2026-103025 (GHSA-7hvw-3c2q-45qg) is a high-severity denial-of-service (DoS) vulnerability in github.com/bep/imagemeta prior to version 0.17.3. The PNG metadata parser fails to validate declared chunk lengths prior to heap buffer allocation (CWE-789) and inflates zlib-compressed zTXt IPTC chunks without an output size limit (CWE-409). Additionally, out-of-bounds slice indexing in the PNG zTXt handler and IPTC character set resolver allows remote attackers to trigger runtime panics.

Amit Schendel
Amit Schendel
2 views•1 min read
•about 7 hours ago•CVE-2026-103033
5.3

CVE-2026-103033: Pre-Verification Nil-Map Panic and Denial of Service in ALTCHA Go Library

CVE-2026-103033 (GHSA-gfwj-45pc-w6r5) is an unauthenticated pre-verification Denial of Service (DoS) vulnerability in the Go implementation of the ALTCHA bot-prevention library (github.com/altcha-org/altcha-lib-go). In versions 2.0.0 and 2.0.1, the internal function parseServerSignature conditionally initializes the ServerSignatureVerificationData.Extra map only when url.ParseQuery returns no error. When an attacker submits a payload containing both an unrecognized query parameter and malformed percent-encoding in the VerificationData field, url.ParseQuery returns partially parsed parameters alongside an error. Because execution continues without initializing the Extra map, the subsequent loop attempts to write unknown parameters into a nil map, triggering a fatal Go runtime panic before cryptographic signature verification occurs.

Alon Barad
Alon Barad
3 views•10 min read