baserCMS: Path traversal in the BcThemeFile admin screen allows file disclosure
What fixes it
No source in this snapshot names a fixed version. The vendor advisories under References are the place to check.
Description
baserCMS is a website development framework. In versions 5.0.0 before 5.3.2 and 5.4.0 before 5.4.2, an authenticated user with only theme-file view permission can traverse outside the theme directory through the optional BcThemeFile plugin's Admin web screen. ThemeFilesController::parseArgs() constructs a path containing literal ../ segments, and the view and edit actions pass it to ThemeFilesService::get() without containment validation. Authorization checks the unresolved request path, after which ThemeFile::_getContents() reads the resolved file and exposes its contents in the form textarea. A client must preserve the dot segments rather than normalize them away. Readable files are limited to .php, .css, .js, and .ctp; this can disclose application source and config/install.php database credentials in MySQL or PostgreSQL deployments, while SQLite configurations have an empty database password. Reading config/app_local.php may expose the Security.salt fallback, which is effective only when not overridden by environment configuration. The flaw does not disclose .env, .pem, or SQLite .db files, does not itself permit file writes or code execution, and does not affect the separate API getFullpath() route. The plugin is disabled by default and unauthenticated requests are not sufficient. This issue has been patched in versions 5.3.2 and 5.4.2.
Text from CVE List
Affected versions 2
- basercmsaffected: >= 5.0.0, < 5.3.2CVE List
- basercmsaffected: >= 5.4.0, < 5.4.2CVE List
References 5
- github.com/baserproject/basercms/commit/53ecf177dfb10eb1fb89c4b42d313983329aa162Fixvia CVE List
- github.com/baserproject/basercms/commit/9bc50d7a47cd834dad5ed80ad7a2e9fcb63f1321Fixvia CVE List
- github.com/baserproject/basercms/releases/tag/5.3.2Fixvia CVE List
- github.com/baserproject/basercms/releases/tag/5.4.2Fixvia CVE List
- github.com/baserproject/basercms/security/advisories/GHSA-rqr8-gmx5-xvrrAdvisoryvia CVE List